Add playbook for cleaning workspaces

Sometimes we need to clean the workspaces. While we have a command
documented, go ahead and make a playbook for it.

Change-Id: I1887dec24563811a71157c000b2d8ae9b7850d6a
This commit is contained in:
Monty Taylor 2014-05-29 17:47:03 -07:00
parent 034f37c32a
commit 92b29acd0d
3 changed files with 10 additions and 1 deletions

View File

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

View File

@ -0,0 +1,4 @@
---
- hosts: *.slave.openstack.org
tasks:
- shell: 'rm -rf ~jenkins/workspace/*{{ project }}*'

View File

@ -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],
}
}