Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pcs provider for cs_rsc_defaults type #399

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix rubocop for pcs provider
Signed-off-by: Anton Baranov <[email protected]>
spacedog committed Apr 3, 2017
commit 7372e65b4131760db9051ab195d8419230553b24
12 changes: 5 additions & 7 deletions lib/puppet/provider/cs_rsc_defaults/pcs.rb
Original file line number Diff line number Diff line change
@@ -78,12 +78,10 @@ def value=(should)
# the updates that need to be made. The temporary file is then used
# as stdin for the pcs command.
def flush
unless @property_hash.empty?
# rubocop:enable Style/GuardClause
# clear this on properties, in case it's set from a previous
# run of a different corosync type
cmd = [command(:pcs), 'resource', 'defaults', "#{@property_hash[:name]}=#{@property_hash[:value]}"]
PuppetX::Voxpupuli::Corosync::Provider::Pcs.run_command_in_cib(cmd, @resource[:cib])
end
return if @property_hash.empty?
# clear this on properties, in case it's set from a previous
# run of a different corosync type
cmd = [command(:pcs), 'resource', 'defaults', "#{@property_hash[:name]}=#{@property_hash[:value]}"]
PuppetX::Voxpupuli::Corosync::Provider::Pcs.run_command_in_cib(cmd, @resource[:cib])
end
end