Put playbooks in a directory
Listing each of them individually in the puppetmaster.pp file is just plain crazypants. Change-Id: Ice621be7d62ec8ff5bc680cf24c237c38f8f30e5
This commit is contained in:
parent
6db6ba3724
commit
75c068f767
@ -482,7 +482,7 @@ To rename a project:
|
||||
changing, gate jobs may fail due to outdated remote URLs. Clear
|
||||
the workspaces on persistent Jenkins slaves to mitigate this::
|
||||
|
||||
sudo ansible-playbook -f 10 /etc/ansible/clean_workspaces.yaml --extra-vars "project=PROJECTNAME"
|
||||
sudo ansible-playbook -f 10 /etc/ansible/playbooks/clean_workspaces.yaml --extra-vars "project=PROJECTNAME"
|
||||
|
||||
#. Again, if this is an org move rather than a rename and the GitHub
|
||||
project has been created but is empty, trigger replication to
|
||||
|
@ -18,10 +18,6 @@ class openstack_project::puppetmaster (
|
||||
ca_server => $ca_server,
|
||||
}
|
||||
|
||||
$ansible_remote_puppet_else_source = 'puppet:///modules/openstack_project/ansible/remote_puppet_else.yaml'
|
||||
$ansible_remote_puppet_afs_source = 'puppet:///modules/openstack_project/ansible/remote_puppet_afs.yaml'
|
||||
$ansible_remote_puppet_git_source = 'puppet:///modules/openstack_project/ansible/remote_puppet_git.yaml'
|
||||
|
||||
file {'/etc/puppet/environments':
|
||||
ensure => directory,
|
||||
owner => 'root',
|
||||
@ -166,27 +162,26 @@ class openstack_project::puppetmaster (
|
||||
|
||||
# Playbooks
|
||||
#
|
||||
file { '/etc/ansible/remote_puppet_else.yaml':
|
||||
ensure => present,
|
||||
source => $ansible_remote_puppet_else_source,
|
||||
file { '/etc/ansible/playbooks':
|
||||
ensure => directory,
|
||||
recurse => true,
|
||||
source => 'puppet:///modules/openstack_project/ansible/playbooks',
|
||||
require => Class[ansible],
|
||||
}
|
||||
|
||||
file { '/etc/ansible/remote_puppet.yaml':
|
||||
ensure => absent,
|
||||
}
|
||||
file { '/etc/ansible/remote_puppet_afs.yaml':
|
||||
ensure => present,
|
||||
source => $ansible_remote_puppet_afs_source,
|
||||
require => Class[ansible],
|
||||
ensure => absent,
|
||||
}
|
||||
file { '/etc/ansible/remote_puppet_else.yaml':
|
||||
ensure => absent,
|
||||
}
|
||||
|
||||
file { '/etc/ansible/remote_puppet_git.yaml':
|
||||
ensure => present,
|
||||
source => $ansible_remote_puppet_git_source,
|
||||
require => Class[ansible],
|
||||
ensure => absent,
|
||||
}
|
||||
|
||||
file { '/etc/ansible/clean_workspaces.yaml':
|
||||
ensure => present,
|
||||
source => 'puppet:///modules/openstack_project/ansible/clean_workspaces.yaml',
|
||||
require => Class[ansible],
|
||||
ensure => absent,
|
||||
}
|
||||
}
|
||||
|
@ -25,9 +25,9 @@ touch manifests/site.pp
|
||||
|
||||
# First run the git/gerrit sequence, since it's important that they all work
|
||||
# together
|
||||
ansible-playbook /etc/ansible/remote_puppet_git.yaml >> /var/log/puppet_run_all.log 2>&1
|
||||
ansible-playbook /etc/ansible/playbooks/remote_puppet_git.yaml >> /var/log/puppet_run_all.log 2>&1
|
||||
# Run AFS changes separately so we can make sure to only do one at a time
|
||||
# (turns out quorum is nice to have)
|
||||
ansible-playbook -f 1 /etc/ansible/remote_puppet_afs.yaml >> /var/log/puppet_run_all.log 2>&1
|
||||
ansible-playbook -f 1 /etc/ansible/playbooks/remote_puppet_afs.yaml >> /var/log/puppet_run_all.log 2>&1
|
||||
# Run everything else. We do not care if the other things worked
|
||||
ansible-playbook /etc/ansible/remote_puppet_else.yaml >> /var/log/puppet_run_all.log 2>&1
|
||||
ansible-playbook /etc/ansible/playbooks/remote_puppet_else.yaml >> /var/log/puppet_run_all.log 2>&1
|
||||
|
Loading…
x
Reference in New Issue
Block a user