Merge "Do not create and destroy Sahara templates if exists"
This commit is contained in:
commit
7f969e3a6c
@ -179,8 +179,7 @@ Puppet::Type.type(:sahara_cluster_template).provide(:ruby) do
|
||||
node_group['count'] = node_group['count'].to_i if node_group['count']
|
||||
end
|
||||
if present?
|
||||
destroy if @property_hash[:id]
|
||||
connection.create_cluster_template options
|
||||
connection.create_cluster_template options unless @property_hash[:id]
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -209,8 +209,7 @@ Puppet::Type.type(:sahara_node_group_template).provide(:ruby) do
|
||||
debug 'Call: flush'
|
||||
options = @property_hash.reject { |k, v| [:id, :ensure].include? k }
|
||||
if present?
|
||||
destroy if @property_hash[:id]
|
||||
connection.create_node_group_template options
|
||||
connection.create_node_group_template options unless @property_hash[:id]
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user