add initial syncing playbooks

This commit is contained in:
Louis Abel 2023-02-19 20:54:48 -07:00
parent 63602e18e2
commit 92aaa2639e
Signed by: label
GPG Key ID: B37E62D143879B36
7 changed files with 110 additions and 1 deletions

View 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
...

View 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
...

View 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
...

View File

@ -1,3 +1,3 @@
---
# none
[]
...

View 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"
...

View 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"
...

View 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"
...