Merge "Put playbooks in a directory"

This commit is contained in:
Jenkins 2015-01-24 20:39:19 +00:00 committed by Gerrit Code Review
commit 84eefdc30a
7 changed files with 17 additions and 22 deletions

View File

@ -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

View File

@ -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',
@ -173,27 +169,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,
}
}

View File

@ -34,9 +34,9 @@ set +e
# 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