Make backup.yml play standalone

certbot_on_virtu
_pollion 2020-08-02 00:42:07 +02:00
parent 79bd75f4bd
commit 896e5e0825
3 changed files with 14 additions and 9 deletions

View File

@ -1,15 +1,7 @@
#!/usr/bin/env ansible-playbook
---
# Set variable adm_iface for all servers
- hosts: server
tasks:
- name: Register adm interface in adm_iface variable
shell: set -o pipefail && grep adm /sys/class/net/*/ifalias | sed "s|/sys/class/net/||" | sed "s|/ifalias:.*||"
register: adm_iface
check_mode: false
changed_when: true
args:
executable: /bin/bash
- import_playbook: plays/get_adm_iface.yml
# Common CRANS configuration for all servers
- hosts: server

View File

@ -3,6 +3,8 @@
# zephir backups virtual machines.
# omnomnom backups home dirs.
- import_playbook: get_adm_iface.yml
# Rsync client on all server to allow backup
- hosts: server
vars:

View File

@ -0,0 +1,11 @@
#!/usr/bin/env ansible-playbook
---
- hosts: server
tasks:
- name: Register adm interface in adm_iface variable
shell: set -o pipefail && grep adm /sys/class/net/*/ifalias | sed "s|/sys/class/net/||" | sed "s|/ifalias:.*||"
register: adm_iface
check_mode: false
changed_when: true
args:
executable: /bin/bash