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 Dec 1, 2021
1 parent 8e81b4c commit a52b0d3
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 0 deletions.
6 changes: 6 additions & 0 deletions requirements-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
- src: https://github.com/CentOS/ansible-role-boot-server
name: boot-server
version: staging
- src: https://github.com/CentOS/ansible-role-cachethq
name: cachethq
version: staging
- src: https://github.com/CentOS/ansible-role-centbot
name: centbot
version: staging
Expand Down Expand Up @@ -167,6 +170,9 @@
- src: https://github.com/CentOS/ansible-role-planet
name: planet
version: staging
- src: https://github.com/CentOS/ansible-role-podman-host
name: podman-host
version: staging
- src: https://github.com/CentOS/ansible-role-postfix
name: postfix
version: staging
Expand Down
4 changes: 4 additions & 0 deletions requirements-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
name: bind
- src: https://github.com/CentOS/ansible-role-boot-server
name: boot-server
- src: https://github.com/CentOS/ansible-role-cachethq
name: cachethq
- src: https://github.com/CentOS/ansible-role-centbot
name: centbot
- src: https://github.com/CentOS/ansible-role-centos-backup
Expand Down Expand Up @@ -111,6 +113,8 @@
name: phpbb
- src: https://github.com/CentOS/ansible-role-planet
name: planet
- src: https://github.com/CentOS/ansible-role-podman-host
name: podman-host
- src: https://github.com/CentOS/ansible-role-postfix
name: postfix
- src: https://github.com/CentOS/ansible-role-postgresql
Expand Down
6 changes: 6 additions & 0 deletions requirements-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
- src: https://github.com/CentOS/ansible-role-boot-server
name: boot-server
version: staging
- src: https://github.com/CentOS/ansible-role-cachethq
name: cachethq
version: staging
- src: https://github.com/CentOS/ansible-role-centbot
name: centbot
version: staging
Expand Down Expand Up @@ -167,6 +170,9 @@
- src: https://github.com/CentOS/ansible-role-planet
name: planet
version: staging
- src: https://github.com/CentOS/ansible-role-podman-host
name: podman-host
version: staging
- src: https://github.com/CentOS/ansible-role-postfix
name: postfix
version: staging
Expand Down
2 changes: 2 additions & 0 deletions role-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- import_playbook: role-ansible-host.yml
- import_playbook: role-bind.yml
- import_playbook: role-boot-server.yml
- import_playbook: role-cachethq.yml
- import_playbook: role-centbot.yml
- import_playbook: role-centos-backup.yml
- import_playbook: role-certbot.yml
Expand Down Expand Up @@ -54,6 +55,7 @@
- import_playbook: role-pdns-pipe.yml
- import_playbook: role-phpbb.yml
- import_playbook: role-planet.yml
- import_playbook: role-podman-host.yml
- import_playbook: role-postfix.yml
- import_playbook: role-postgresql.yml
- import_playbook: role-reimzul-bstore.yml
Expand Down
24 changes: 24 additions & 0 deletions role-cachethq.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
- hosts: hostgroup-role-cachethq
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:
- cachethq

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

24 changes: 24 additions & 0 deletions role-podman-host.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
- hosts: hostgroup-role-podman-host
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:
- podman-host

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

0 comments on commit a52b0d3

Please sign in to comment.