
We use project-config for gerrit, gitea and nodepool config. That's cool, because can clone that from zuul too and make sure that each prod run we're doing runs with the contents of the patch in question. Introduce a flag file that can be touched in /home/zuulcd that will block zuul from running prod playbooks. By default, if the file is there, zuul will wait for an hour before giving up. Rename zuulcd to zuul To better align prod and test, name the zuul user zuul. Change-Id: I83c38c9c430218059579f3763e02d6b9f40c7b89
23 lines
889 B
YAML
23 lines
889 B
YAML
- name: Ensure directory exists for lock files
|
|
file:
|
|
state: directory
|
|
path: /var/run/ansible
|
|
|
|
- name: Set up cron job for running run_cloud_launcher.sh
|
|
cron:
|
|
name: run_cloud_launcher.sh
|
|
state: present
|
|
disabled: "{{ cloud_launcher_disable_job }}"
|
|
job: '/usr/bin/flock -n /var/run/ansible/run_cloud_launcher.lock /bin/bash /home/zuul/src/opendev.org/opendev/system-config/run_cloud_launcher.sh -c >> /var/log/ansible/run_cloud_launcher_cron.log 2>&1'
|
|
minute: "{{ cloud_launcher_cron_interval.minute }}"
|
|
hour: "{{ cloud_launcher_cron_interval.hour }}"
|
|
day: "{{ cloud_launcher_cron_interval.day }}"
|
|
month: "{{ cloud_launcher_cron_interval.month }}"
|
|
weekday: "{{ cloud_launcher_cron_interval.weekday }}"
|
|
|
|
- name: Setup log rotation
|
|
include_role:
|
|
name: logrotate
|
|
vars:
|
|
logrotate_file_name: /var/log/ansible/run_cloud_launcher_cron.log
|