add initial syncing playbooks
This commit is contained in:
parent
63602e18e2
commit
92aaa2639e
16
adhoc-compose-sync-generate-filelist.yml
Normal file
16
adhoc-compose-sync-generate-filelist.yml
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
# This playbook is meant to be used with callable variables, like adhoc or AWX.
|
||||
# What: Creates a simple koji tag. That's it.
|
||||
- name: Generate file list
|
||||
hosts: srpmproc
|
||||
become: true
|
||||
become_user: koji
|
||||
vars_files:
|
||||
- "vars/common.yml"
|
||||
environment:
|
||||
RLVER: "{{ release_ver }}"
|
||||
|
||||
tasks:
|
||||
- name: "Generate file list"
|
||||
import_tasks: tasks/sync/generate_filelist.yml
|
||||
...
|
16
adhoc-compose-sync-production.yml
Normal file
16
adhoc-compose-sync-production.yml
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
# This playbook is meant to be used with callable variables, like adhoc or AWX.
|
||||
# What: Creates a simple koji tag. That's it.
|
||||
- name: Sync a compose to staging
|
||||
hosts: srpmproc
|
||||
become: true
|
||||
become_user: koji
|
||||
vars_files:
|
||||
- "vars/common.yml"
|
||||
environment:
|
||||
RLVER: "{{ release_ver }}"
|
||||
|
||||
tasks:
|
||||
- name: "Sync from staging to production"
|
||||
import_tasks: tasks/sync/sync_to_prod.yml
|
||||
...
|
16
adhoc-compose-sync-staging.yml
Normal file
16
adhoc-compose-sync-staging.yml
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
# This playbook is meant to be used with callable variables, like adhoc or AWX.
|
||||
# What: Creates a simple koji tag. That's it.
|
||||
- name: Sync a compose to staging
|
||||
hosts: srpmproc
|
||||
become: true
|
||||
become_user: koji
|
||||
vars_files:
|
||||
- "vars/common.yml"
|
||||
environment:
|
||||
RLVER: "{{ release_ver }}"
|
||||
|
||||
tasks:
|
||||
- name: "Sync from latest to staging"
|
||||
import_tasks: tasks/sync/sync_to_staging.yml
|
||||
...
|
@ -1,3 +1,3 @@
|
||||
---
|
||||
# none
|
||||
[]
|
||||
...
|
||||
|
13
tasks/sync/generate_filelist.yml
Normal file
13
tasks/sync/generate_filelist.yml
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
- name: "Make sure the sync repo are up to date"
|
||||
ansible.builtin.git:
|
||||
repo: https://git.resf.org/sig_core/toolkit.git
|
||||
dest: /root/sync-devel
|
||||
update: true
|
||||
version: devel
|
||||
|
||||
- name: "Generate file list"
|
||||
ansible.builtin.shell: "/bin/bash /root/sync-devel/sync-file-list-parallel.sh"
|
||||
changed_when: 1 != 1
|
||||
failed_when: "result.rc != 0"
|
||||
...
|
24
tasks/sync/sync_to_prod.yml
Normal file
24
tasks/sync/sync_to_prod.yml
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
- name: "Make sure the sync repo are up to date"
|
||||
ansible.builtin.git:
|
||||
repo: https://git.resf.org/sig_core/toolkit.git
|
||||
dest: /root/sync-devel
|
||||
update: true
|
||||
version: devel
|
||||
|
||||
- name: "Sync {{ release_ver }} to production"
|
||||
ansible.builtin.shell: "/bin/bash /root/sync-devel/sync/sync-to-prod.sh"
|
||||
changed_when: 1 != 1
|
||||
failed_when: "result.rc != 0"
|
||||
when:
|
||||
- release_ver is defined
|
||||
- release_ver == "8"
|
||||
|
||||
- name: "Sync {{ release_ver }} to production (new)"
|
||||
ansible.builtin.shell: "/bin/bash /root/sync-devel/sync/sync-to-prod.delete.sh"
|
||||
changed_when: 1 != 1
|
||||
failed_when: "result.rc != 0"
|
||||
when:
|
||||
- release_ver is defined
|
||||
- release_ver != "9"
|
||||
...
|
24
tasks/sync/sync_to_staging.yml
Normal file
24
tasks/sync/sync_to_staging.yml
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
- name: "Make sure the sync repo are up to date"
|
||||
ansible.builtin.git:
|
||||
repo: https://git.resf.org/sig_core/toolkit.git
|
||||
dest: /root/sync-devel
|
||||
update: true
|
||||
version: devel
|
||||
|
||||
- name: "Sync {{ release_ver }} to staging"
|
||||
ansible.builtin.shell: "/bin/bash /root/sync-devel/sync/sync-to-staging.sh Rocky"
|
||||
changed_when: 1 != 1
|
||||
failed_when: "result.rc != 0"
|
||||
when:
|
||||
- release_ver is defined
|
||||
- release_ver == "8"
|
||||
|
||||
- name: "Sync {{ release_ver }} to staging (new)"
|
||||
ansible.builtin.shell: "/bin/bash /root/sync-devel/sync/sync-to-staging.delete.sh Rocky"
|
||||
changed_when: 1 != 1
|
||||
failed_when: "result.rc != 0"
|
||||
when:
|
||||
- release_ver is defined
|
||||
- release_ver != "9"
|
||||
...
|
Loading…
Reference in New Issue
Block a user