Files
system-config/playbooks/roles/zuul-launcher/tasks/main.yaml
James E. Blair 58890590f1 Move zuul launcher temp dir
We run small launcher nodes, so we are now attaching larger cinder
volumes at /var/lib/zuul.  Move the launcher's temp dir, where it
stores images it is uploading, to a directory under that mount point.

Change-Id: Ief5d8bad4a782db060d4884322c58711ad98fb5e
2025-06-24 11:26:17 -07:00

57 lines
1.3 KiB
YAML

- name: Create Zuul Launcher directories
file:
state: directory
path: '{{ item }}'
owner: '{{ zuul_user }}'
group: '{{ zuul_group }}'
loop:
- /var/lib/zuul/tmp
- name: Install logging config
copy:
src: logging.conf
dest: /etc/zuul/launcher-logging.conf
- name: Rotate launcher logs
include_role:
name: logrotate
vars:
logrotate_file_name: /var/log/zuul/launcher.log
- name: Rotate launcher debug logs
include_role:
name: logrotate
vars:
logrotate_file_name: /var/log/zuul/launcher-debug.log
- name: Ensure launcher temp dir
file:
state: directory
path: /opt/zuul-launcher-tmp
mode: 0755
owner: "{{ zuul_user }}"
group: "{{ zuul_group }}"
- name: Make docker-compose directory
file:
state: directory
path: /etc/zuul-launcher
- name: Install docker-compose file
copy:
src: docker-compose.yaml
dest: /etc/zuul-launcher/docker-compose.yaml
- name: Update container images
include_tasks: pull.yaml
- name: Start containers
include_tasks: start.yaml
when: zuul_launcher_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