diff --git a/group_vars/all/job_templates.yml b/group_vars/all/job_templates.yml index b61f2b1..17aae02 100644 --- a/group_vars/all/job_templates.yml +++ b/group_vars/all/job_templates.yml @@ -69,4 +69,17 @@ controller_templates_all: verbosity: 0 credentials: - vault + + - name: collection_sync + project: config_as_code + job_type: run + playbook: playbooks/sync_collections.yml + inventory: config_as_code + execution_environment: minimal + concurrent_jobs_enabled: false + limit: "{{ env }}" + verbosity: 0 + credentials: + - ah_token_user + - vault ... diff --git a/group_vars/all/schedule.yml b/group_vars/all/schedule.yml index e9241f7..44c20fa 100644 --- a/group_vars/all/schedule.yml +++ b/group_vars/all/schedule.yml @@ -4,4 +4,8 @@ controller_schedules_all: description: Auto run refresh token every 25 days unified_job_template: console_token_refresh # NOTE: you cannot have the same job template name as a project or this will fail rrule: DTSTART:20191219T130500Z RRULE:INTERVAL=25;FREQ=DAILY + - name: auto_run_collection_sync + description: Auto run sync every 7 days + unified_job_template: collection_sync # NOTE: you cannot have the same job template name as a project or this will fail + rrule: DTSTART:20191219T130500Z RRULE:INTERVAL=7;FREQ=DAILY ... diff --git a/playbooks/sync_collections.yml b/playbooks/sync_collections.yml new file mode 100644 index 0000000..24a135b --- /dev/null +++ b/playbooks/sync_collections.yml @@ -0,0 +1,12 @@ +--- +- name: Sync collections + hosts: all + gather_facts: false + connection: local + vars_files: + - ../vaults/{{ env }}.yml + tasks: + - name: Include collection_repository_sync role + ansible.builtin.include_role: + name: infra.ah_configuration.collection_repository_sync +...