diff --git a/doc/source/gerrit.rst b/doc/source/gerrit.rst index c7feb1b747..b0f0214275 100644 --- a/doc/source/gerrit.rst +++ b/doc/source/gerrit.rst @@ -474,7 +474,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 salt '*.slave.openstack.org' cmd.run 'rm -rf ~jenkins/workspace/*PROJECT*' + sudo ansible-playbook -f 10 /etc/ansible/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/clean_workspaces.yaml new file mode 100644 index 0000000000..78cc611a38 --- /dev/null +++ b/modules/openstack_project/files/ansible/clean_workspaces.yaml @@ -0,0 +1,4 @@ +--- +- hosts: *.slave.openstack.org + tasks: + - shell: 'rm -rf ~jenkins/workspace/*{{ project }}*' diff --git a/modules/openstack_project/manifests/puppetmaster.pp b/modules/openstack_project/manifests/puppetmaster.pp index 376ca06060..8459fd585d 100644 --- a/modules/openstack_project/manifests/puppetmaster.pp +++ b/modules/openstack_project/manifests/puppetmaster.pp @@ -123,4 +123,9 @@ class openstack_project::puppetmaster ( require => Class[ansible], } + file { '/etc/ansible/clean_workspaces.yaml': + ensure => present, + source => 'puppet:///modules/openstack_project/ansible/clean_workspaces.yaml', + require => Class[ansible], + } }