Skip to content

Commit

Permalink
Automatic regen with all existing roles
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Arrotin <[email protected]>
  • Loading branch information
arrfab committed Jan 18, 2021
1 parent 56f1392 commit 1d75673
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 6 deletions.
7 changes: 6 additions & 1 deletion adhoc-deploy-kvm-guest.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
---
- hosts: kvm-guests
- hosts: "{{ init_kvm_guests }}"
become: true
gather_facts: false
vars_prompt:
- name: "init_kvm_guests"
prompt: "[WARNING] KVM guests to be deployed with CentOS => "
private: no

tasks:
- name: Checking Virtual Guest exists
virt:
Expand Down
3 changes: 3 additions & 0 deletions requirements-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
- src: https://github.com/CentOS/ansible-role-certbot
name: certbot
version: staging
- src: https://github.com/CentOS/ansible-role-distgit-lookaside
name: distgit-lookaside
version: staging
- src: https://github.com/CentOS/ansible-role-geoip2
name: geoip2
version: staging
Expand Down
2 changes: 2 additions & 0 deletions requirements-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
name: centos-backup
- src: https://github.com/CentOS/ansible-role-certbot
name: certbot
- src: https://github.com/CentOS/ansible-role-distgit-lookaside
name: distgit-lookaside
- src: https://github.com/CentOS/ansible-role-geoip2
name: geoip2
- src: https://github.com/CentOS/ansible-role-gitea
Expand Down
3 changes: 3 additions & 0 deletions requirements-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
- src: https://github.com/CentOS/ansible-role-certbot
name: certbot
version: staging
- src: https://github.com/CentOS/ansible-role-distgit-lookaside
name: distgit-lookaside
version: staging
- src: https://github.com/CentOS/ansible-role-geoip2
name: geoip2
version: staging
Expand Down
1 change: 1 addition & 0 deletions role-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- import_playbook: role-centbot.yml
- import_playbook: role-centos-backup.yml
- import_playbook: role-certbot.yml
- import_playbook: role-distgit-lookaside.yml
- import_playbook: role-geoip2.yml
- import_playbook: role-gitea.yml
- import_playbook: role-haproxy.yml
Expand Down
24 changes: 24 additions & 0 deletions role-distgit-lookaside.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
- hosts: hostgroup-role-distgit-lookaside
become: True
pre_tasks:
- name: Checking if no-ansible file is there
stat:
path: /etc/no-ansible
register: no_ansible

- name: Verifying if we can run ansible or not
assert:
that:
- "not no_ansible.stat.exists"
msg: "/etc/no-ansible file exists so skipping ansible run on this node"

roles:
- distgit-lookaside

post_tasks:
- name: Touching ansible-run (monitored by Zabbix)
file:
path: /var/log/ansible.run
state: touch

4 changes: 2 additions & 2 deletions role-odcs-backend.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
- name: Setup ODCS backend
hosts: hostgroup-role-odcs-backend
- hosts: hostgroup-role-odcs-backend
become: True
pre_tasks:
- name: Checking if no-ansible file is there
Expand All @@ -22,3 +21,4 @@
file:
path: /var/log/ansible.run
state: touch

4 changes: 2 additions & 2 deletions role-odcs-frontend.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
- name: Setup ODCS frontend
hosts: hostgroup-role-odcs-frontend
- hosts: hostgroup-role-odcs-frontend
become: True
pre_tasks:
- name: Checking if no-ansible file is there
Expand All @@ -22,3 +21,4 @@
file:
path: /var/log/ansible.run
state: touch

2 changes: 1 addition & 1 deletion templates/kickstarts/kvm-guest-c8-ks.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
auth --enableshadow --passalgo=sha512

# Use network installation
url --url="http://mirror.centos.org/centos/8/BaseOS/{{ kvm_guest_arch }}/os/"
url --url="http://mirror.centos.org/centos/{{ kvm_guest_distro_release }}/BaseOS/{{ kvm_guest_arch }}/os/"
# Run the Setup Agent on first boot
firstboot --enable
#ignoredisk --only-use=sda
Expand Down
1 change: 1 addition & 0 deletions templates/kickstarts/kvm-guest-c8-stream-ks.j2

0 comments on commit 1d75673

Please sign in to comment.