Skip to content

Commit

Permalink
Added adhoc task for wordpress upgrade and new restic role
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Arrotin <[email protected]>
  • Loading branch information
arrfab committed Feb 13, 2020
1 parent d526030 commit b36f74c
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 0 deletions.
11 changes: 11 additions & 0 deletions adhoc-upgrade-wordpress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
- hosts: hostgroup-role-wp
become: True
tasks:
- name: Upgrading wordpress to latest version (or specific release)
unarchive:
src: "https://wordpress.org/wordpress-{{ wp_release | default('latest') }}.tar.gz"
remote_src: yes
dest: "{{ wp_local_path | default('/var/www/wordpress') }}"
extra_opts:
- --strip-components=1
2 changes: 2 additions & 0 deletions requirements-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@
name: reimzul-controller
- src: https://github.com/CentOS/ansible-role-repospanner
name: repospanner
- src: https://github.com/CentOS/ansible-role-restic
name: restic
- src: https://github.com/CentOS/ansible-role-rsnapshot
name: rsnapshot
- src: https://github.com/CentOS/ansible-role-rsyncd
Expand Down
3 changes: 3 additions & 0 deletions requirements-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@
- src: https://github.com/CentOS/ansible-role-repospanner
name: repospanner
version: staging
- src: https://github.com/CentOS/ansible-role-restic
name: restic
version: staging
- src: https://github.com/CentOS/ansible-role-rsnapshot
name: rsnapshot
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 @@ -45,6 +45,7 @@
- import_playbook: role-reimzul-builder.yml
- import_playbook: role-reimzul-controller.yml
- import_playbook: role-repospanner.yml
- import_playbook: role-restic.yml
- import_playbook: role-rsnapshot.yml
- import_playbook: role-rsyncd.yml
- import_playbook: role-sshd.yml
Expand Down
24 changes: 24 additions & 0 deletions role-restic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
- hosts: hostgroup-role-restic
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:
- restic

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

0 comments on commit b36f74c

Please sign in to comment.