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:
parent
ecc577eb0e
commit
842f241618
@ -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
|
||||
|
4
roles/legacy-copy-jenkins-scripts/README.rst
Normal file
4
roles/legacy-copy-jenkins-scripts/README.rst
Normal 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.
|
10
roles/legacy-copy-jenkins-scripts/tasks/main.yaml
Normal file
10
roles/legacy-copy-jenkins-scripts/tasks/main.yaml
Normal 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
|
Loading…
Reference in New Issue
Block a user