Skip to content

Commit

Permalink
Merge pull request #313 from jirkafajfr/master
Browse files Browse the repository at this point in the history
Consul Watch: Ignore owner/group on windows machines
  • Loading branch information
Ginja committed May 10, 2016
2 parents 3bd2179 + 6913f6b commit 0bbc6f5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions libraries/consul_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def tls?
notifying_block do
directory ::File.dirname(new_resource.path) do
recursive true
if node['os'].eql? 'linux'
unless windows?
owner new_resource.owner
group new_resource.group
mode '0755'
Expand All @@ -120,7 +120,7 @@ def tls?
end

file new_resource.path do
if node['os'].eql? 'linux'
unless windows?
owner new_resource.owner
group new_resource.group
mode '0640'
Expand Down
4 changes: 2 additions & 2 deletions libraries/consul_definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def to_json
notifying_block do
directory ::File.dirname(new_resource.path) do
recursive true
if node['os'].eql? 'linux'
unless windows?
owner new_resource.user
group new_resource.group
mode '0755'
Expand All @@ -54,7 +54,7 @@ def to_json

file new_resource.path do
content new_resource.to_json
if node['os'].eql? 'linux'
unless windows?
owner new_resource.user
group new_resource.group
mode '0640'
Expand Down
16 changes: 10 additions & 6 deletions libraries/consul_watch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,20 @@ def to_json
notifying_block do
directory ::File.dirname(new_resource.path) do
recursive true
owner new_resource.user
group new_resource.group
mode '0755'
unless windows?
owner new_resource.user
group new_resource.group
mode '0755'
end
end

file new_resource.path do
owner new_resource.user
group new_resource.group
content new_resource.to_json
mode '0640'
unless windows?
owner new_resource.user
group new_resource.group
mode '0640'
end
end
end
end
Expand Down

0 comments on commit 0bbc6f5

Please sign in to comment.