Skip to content

Instantly share code, notes, and snippets.

@ipcrm
Created May 14, 2018 14:53
Show Gist options
  • Select an option

  • Save ipcrm/d877c78c249eb37aa84a063ab1c4821e to your computer and use it in GitHub Desktop.

Select an option

Save ipcrm/d877c78c249eb37aa84a063ab1c4821e to your computer and use it in GitHub Desktop.
switch-control-repo
node_group { 'PE Master':
ensure => 'present',
classes => {
'pe_repo' => {},
'pe_repo::platform::el_7_x86_64' => {},
'pe_repo::platform::windows_x86_64' => {},
'puppet_enterprise::profile::master' => {
'code_manager_auto_configure' => true,
'r10k_private_key' => '/etc/puppetlabs/puppetserver/ssh/id-control_repo.rsa',
'r10k_remote' => 'https://gitlab.com/ipcrm/cd4pe-hol-cr.git',
'replication_mode' => 'none'
}
},
environment => 'production',
override_environment => 'false',
parent => 'PE Infrastructure',
rule => ['or',
['=', 'name', 'master.inf.puppet.vm']],
notify => Exec['run_puppet'],
}
exec {'run_puppet':
command => '/opt/puppetlabs/bin/puppet agent -t',
returns => [2],
refreshonly => true,
notify => Exec['deploy_code'],
}
exec {'deploy_code':
command => '/opt/puppetlabs/bin/puppet-code deploy --all -w',
refreshonly => true,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment