diff --git a/doc/source/gerrit.rst b/doc/source/gerrit.rst index 14622951a9..53177775ed 100644 --- a/doc/source/gerrit.rst +++ b/doc/source/gerrit.rst @@ -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 diff --git a/modules/openstack_project/files/ansible/clean_workspaces.yaml b/modules/openstack_project/files/ansible/playbooks/clean_workspaces.yaml similarity index 100% rename from modules/openstack_project/files/ansible/clean_workspaces.yaml rename to modules/openstack_project/files/ansible/playbooks/clean_workspaces.yaml diff --git a/modules/openstack_project/files/ansible/remote_puppet_afs.yaml b/modules/openstack_project/files/ansible/playbooks/remote_puppet_afs.yaml similarity index 100% rename from modules/openstack_project/files/ansible/remote_puppet_afs.yaml rename to modules/openstack_project/files/ansible/playbooks/remote_puppet_afs.yaml diff --git a/modules/openstack_project/files/ansible/remote_puppet_else.yaml b/modules/openstack_project/files/ansible/playbooks/remote_puppet_else.yaml similarity index 100% rename from modules/openstack_project/files/ansible/remote_puppet_else.yaml rename to modules/openstack_project/files/ansible/playbooks/remote_puppet_else.yaml diff --git a/modules/openstack_project/files/ansible/remote_puppet_git.yaml b/modules/openstack_project/files/ansible/playbooks/remote_puppet_git.yaml similarity index 100% rename from modules/openstack_project/files/ansible/remote_puppet_git.yaml rename to modules/openstack_project/files/ansible/playbooks/remote_puppet_git.yaml diff --git a/modules/openstack_project/manifests/puppetmaster.pp b/modules/openstack_project/manifests/puppetmaster.pp index 3a4e21772c..9d9c46456e 100644 --- a/modules/openstack_project/manifests/puppetmaster.pp +++ b/modules/openstack_project/manifests/puppetmaster.pp @@ -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, } } diff --git a/run_all.sh b/run_all.sh index 4e8c3d549a..42dad62f89 100755 --- a/run_all.sh +++ b/run_all.sh @@ -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