
Our Zuul executors already have the openafs-client role which includes a /etc/apt/sources.list.d/openafs.list file for our PPA with custom OpenAFS package backports. The zuul-executor role doesn't need to add another copy (and the duplicate is breaking apt now). Change-Id: Icdb6d2f3bf36b0cad901d42c3d97873677ee87cb
76 lines
1.9 KiB
YAML
76 lines
1.9 KiB
YAML
- name: Write key for talking to nodepool nodes
|
|
copy:
|
|
content: '{{ nodepool_test_node_ssh_private_key_contents }}'
|
|
dest: /var/lib/zuul/ssh/nodepool_id_rsa
|
|
mode: 0400
|
|
owner: '{{ zuul_user }}'
|
|
group: '{{ zuul_group }}'
|
|
|
|
- name: Create Zuul Executor directories
|
|
file:
|
|
state: directory
|
|
path: '{{ item }}'
|
|
owner: '{{ zuul_user }}'
|
|
group: '{{ zuul_group }}'
|
|
loop:
|
|
- /var/lib/zuul/builds
|
|
- /var/lib/zuul/git
|
|
|
|
- name: Set up cron job to pack git refs
|
|
cron:
|
|
name: pack-git-refs
|
|
state: present
|
|
job: 'find /var/lib/zuul/git/ -maxdepth 3 -type d -name ".git" -exec git --git-dir="{}" pack-refs --all \;'
|
|
minute: '7'
|
|
hour: '4'
|
|
|
|
- name: Install logging config
|
|
copy:
|
|
src: logging.conf
|
|
dest: /etc/zuul/executor-logging.conf
|
|
|
|
- name: Rotate executor logs
|
|
include_role:
|
|
name: logrotate
|
|
vars:
|
|
logrotate_file_name: /var/log/zuul/executor.log
|
|
|
|
- name: Rotate executor debug logs
|
|
include_role:
|
|
name: logrotate
|
|
vars:
|
|
logrotate_file_name: /var/log/zuul/executor-debug.log
|
|
|
|
- name: Make docker systemd override directory
|
|
file:
|
|
state: directory
|
|
path: /etc/systemd/system/docker.service.d
|
|
|
|
- name: Install docker systemd override for openafs ordering
|
|
copy:
|
|
src: after-afs.conf
|
|
dest: /etc/systemd/system/docker.service.d/after-afs.conf
|
|
|
|
- name: Make docker-compose directory
|
|
file:
|
|
state: directory
|
|
path: /etc/zuul-executor
|
|
|
|
- name: Install docker-compose file
|
|
copy:
|
|
src: docker-compose.yaml
|
|
dest: /etc/zuul-executor/docker-compose.yaml
|
|
|
|
- name: Update container images
|
|
include_tasks: pull.yaml
|
|
|
|
- name: Start containers
|
|
include_tasks: start.yaml
|
|
when: zuul_executor_start | bool
|
|
|
|
# We can prune here as it should leave the "latest" tagged images
|
|
# as well as the currently running images.
|
|
- name: Run docker prune to cleanup unneeded images
|
|
shell:
|
|
cmd: docker image prune -f
|