Consolidate legacy scripts

Create new role legacy-copy-jenkins-scripts to populate
/usr/local/jenkins/slave_scripts.

Move existing scripts from playbooks/legacy to the files directory of
the new role.

Use the new role instead of a task.

Change-Id: I2dcfdf46f0d953afa8100557488a393962dba9bb
This commit is contained in:
Andreas Jaeger 2018-02-09 08:02:11 +01:00
parent ecc577eb0e
commit 842f241618
5 changed files with 15 additions and 10 deletions

View File

@ -3,6 +3,7 @@
- role: fetch-zuul-cloner
destination: "/usr/zuul-env/bin/zuul-cloner"
repo_src_dir: "/home/zuul/src/git.openstack.org"
- legacy-copy-jenkins-scripts
tasks:
- name: Create nodepool directory
@ -44,16 +45,6 @@
- id_rsa
- id_rsa.pub
- name: Copy files to the script dir on the node
copy:
dest: '/usr/local/jenkins/slave_scripts/{{ item }}'
src: '{{ item }}'
mode: 0755
with_items:
- install-distro-packages.sh
- zuul-sudo-grep.sh
become: true
- name: Add sudoers role for zuul-sudo-grep.sh
copy:
dest: /etc/sudoers.d/zuul-sudo-grep

View File

@ -0,0 +1,4 @@
Copy scripts to ``/usr/jenkins/slave_scripts`` directory on remote hosts.
.. note:: This role is deprecated and only exists for transition purposes.
It should not be used for new jobs.

View File

@ -0,0 +1,10 @@
- name: Copy files to the slave_script dir on the node
copy:
# Ansible will create this folder automatically
dest: '/usr/local/jenkins/slave_scripts/'
src: '{{ item }}'
mode: 0755
with_items:
- install-distro-packages.sh
- zuul-sudo-grep.sh
become: true