Resources shoud be created in a separate task
We shoud not create resources in all tasks. Only resouce parameters update should be available for user. Separate task will be used in order to create new resources (e.g. to introduce new configuration file parameters). Change-Id: I89ff7d9b6434519107f88d26fceb564a3bda2edc Closes-Bug: 1644656 Closes-Bug: 1655928
This commit is contained in:
parent
01c138cb88
commit
24318bea01
@ -165,7 +165,7 @@ Puppet::Type.newtype(:override_resources) do
|
||||
def create?
|
||||
create = self[:create]
|
||||
return create unless create.nil?
|
||||
options.fetch 'create', true
|
||||
options.fetch 'create', false
|
||||
end
|
||||
|
||||
# Get the list of type create exceptions
|
||||
|
@ -0,0 +1,14 @@
|
||||
class osnailyfacter::create_resources {
|
||||
|
||||
notice('MODULAR: astute/create_resources.pp')
|
||||
|
||||
$override_configuration = hiera_hash(configuration, {})
|
||||
$override_configuration_options = hiera_hash(configuration_options, {})
|
||||
|
||||
override_resources {'override-resources':
|
||||
configuration => $override_configuration,
|
||||
options => $override_configuration_options,
|
||||
create => true,
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1 @@
|
||||
include ::osnailyfacter::create_resources
|
@ -420,3 +420,21 @@
|
||||
dst: /etc/hiera/deleted_nodes.yaml
|
||||
permissions: '0640'
|
||||
dir_permissions: '0750'
|
||||
|
||||
- id: create_resources
|
||||
type: puppet
|
||||
version: 2.1.0
|
||||
role: ['/.*/']
|
||||
requires: [post_deployment_start]
|
||||
required_for: [post_deployment_end]
|
||||
cross-depends:
|
||||
- name: post_deployment_start
|
||||
role: self
|
||||
cross-depended-by:
|
||||
- name: post_deployment_end
|
||||
role: self
|
||||
parameters:
|
||||
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/astute/create_resources.pp
|
||||
puppet_modules: /etc/puppet/modules
|
||||
timeout: 300
|
||||
cwd: /
|
||||
|
Loading…
Reference in New Issue
Block a user