diff --git a/playbooks/roles/sync-project-config/README.rst b/playbooks/roles/sync-project-config/README.rst index f30e2ad8cd..39752d794f 100644 --- a/playbooks/roles/sync-project-config/README.rst +++ b/playbooks/roles/sync-project-config/README.rst @@ -1 +1,14 @@ Sync project-config to remote host + +This syncs the ``project-config`` repo checked out on the bastion host +(which is actually running the Ansible that runs this role) to the +current host. This repo holds configuration for some production hosts +and thus we want to make sure to deploy those services with the +checked-out tree Zuul has prepared for a given deploy-pipeline CD job +run (i.e. so we apply config updates in commit order). + +Also see the `setup-src +`__ +to see where this checkout is setup; there are some tricks -- for +example for hourly and periodic jobs we want to ensure we run from +master at the time the job runs, not at the time the job was enqueued. diff --git a/playbooks/roles/sync-project-config/defaults/main.yaml b/playbooks/roles/sync-project-config/defaults/main.yaml index e17024ad67..1dad7599f7 100644 --- a/playbooks/roles/sync-project-config/defaults/main.yaml +++ b/playbooks/roles/sync-project-config/defaults/main.yaml @@ -1,3 +1,2 @@ project_config_dest: /opt/project-config project_config_subdir: "" -infra_prod_run_from_master: "{{ zuul.pipeline|default('') in ['periodic', 'opendev-prod-hourly'] }}" diff --git a/playbooks/roles/sync-project-config/tasks/main.yaml b/playbooks/roles/sync-project-config/tasks/main.yaml index e9119969c2..8c54d4989e 100644 --- a/playbooks/roles/sync-project-config/tasks/main.yaml +++ b/playbooks/roles/sync-project-config/tasks/main.yaml @@ -3,14 +3,6 @@ path: '{{ project_config_dest }}' state: directory -- name: Update from master on bastion host - when: infra_prod_run_from_master|bool - delegate_to: '{{ groups["bastion"][0] }}' - git: - repo: https://opendev.org/openstack/project-config - dest: '{{ project_config_src }}' - force: yes - - name: Sync project-config repo synchronize: src: '{{ project_config_src }}/{{ project_config_subdir }}'