Add utility script to disable ansible

Touching the file works, but it's easy to misspell.

Change-Id: I4980ac2c290abd6cda39846e651fb490bfafe96f
This commit is contained in:
Monty Taylor 2020-06-12 17:20:08 -05:00
parent 3ffeba5a20
commit dea12612c5
3 changed files with 17 additions and 1 deletions

View File

@ -76,7 +76,9 @@ Each service that has been migrated fully to Ansible has its own playbook in
:git_file:`playbooks` named ``service_{ service_name }.yaml``.
Because the playbooks are normally run by zuul, to run them manually, first
touch the file ``/home/zuul/DISABLE-ANSIBLE``. Then make sure no jobs are
run the utility ``disable-ansible`` as root. That will touch the file
``/home/zuul/DISABLE-ANSIBLE``. We use the utility to avoid mistyping the
lockfile name. Then make sure no jobs are
currently executing ansible. Ensure that ``/home/zuul/src/opendev.org/opendev/system-config``
and ``/home/zuul/src/opendev.org/openstack/project-config`` are in the
appropriate states, then run:

View File

@ -0,0 +1,6 @@
#!/bin/bash
# This is a simple script but ensures we don't mis-type the
# file name.
touch /home/zuul/DISABLE-ANSIBLE

View File

@ -111,6 +111,14 @@
src: roles/
dest: /etc/ansible/roles
- name: Copy disable-ansible utility script in place
copy:
src: disable-ansible
dest: /usr/local/bin/disable-ansible
mode: 0755
owner: root
group: root
- name: Make sure k8s-on-openstack repo is up to date
git:
repo: https://github.com/infraly/k8s-on-openstack