add ansible files

This commit is contained in:
Andreas Zweili 2021-10-25 22:13:30 +02:00
parent 023f5d3837
commit 59cd8a50d9
2 changed files with 25 additions and 0 deletions

9
ansible-requirements.yml Normal file
View File

@ -0,0 +1,9 @@
roles:
- src: https://git.2li.ch/ansible/common.git
scm: git
- src: https://git.2li.ch/ansible/common-server.git
scm: git
- src: https://git.2li.ch/ansible/restic.git
scm: git
- src: https://git.2li.ch/ansible/docker.git
scm: git

16
playbook.yml Normal file
View File

@ -0,0 +1,16 @@
- hosts: docker
become: true
roles:
- common
- docker
- restic
- hosts: rebootable
become: true
tasks:
- name: Check reboot if required
stat: path=/var/run/reboot-required get_md5=no
register: sym
- name: Reboot if required
reboot:
when: sym.stat.exists is defined and sym.stat.exists