Cleanup playbooks
This commit is contained in:
parent
f7d69968be
commit
0881ee91a7
4 changed files with 18 additions and 25 deletions
6
playbooks/prepare-opentofu.yml
Normal file
6
playbooks/prepare-opentofu.yml
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
- name: Prepare opentofu
|
||||||
|
hosts: localhost
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- name: Import tasks to prepare opentofu
|
||||||
|
ansible.builtin.import_tasks: tasks/prepare-opentofu.yml
|
||||||
|
|
@ -1,17 +1,10 @@
|
||||||
---
|
---
|
||||||
- name: Prepare
|
- name: Prepare opentofu
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
tasks:
|
tasks:
|
||||||
- name: Run opentofu init
|
- name: Import tasks to prepare opentofu
|
||||||
ansible.builtin.command:
|
ansible.builtin.import_tasks: tasks/prepare-opentofu.yml
|
||||||
cmd: tofu init
|
|
||||||
chdir: "{{ playbook_dir }}/.."
|
|
||||||
check_mode: false
|
|
||||||
tags: always
|
|
||||||
- name: Refresh inventory with opentofu available
|
|
||||||
ansible.builtin.meta: refresh_inventory
|
|
||||||
tags: always
|
|
||||||
|
|
||||||
- name: Run all roles
|
- name: Run all roles
|
||||||
hosts: serguzim_net
|
hosts: serguzim_net
|
||||||
|
|
|
||||||
9
playbooks/tasks/prepare-opentofu.yml
Normal file
9
playbooks/tasks/prepare-opentofu.yml
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
- name: Run opentofu init
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: tofu init
|
||||||
|
chdir: "{{ playbook_dir }}/.."
|
||||||
|
check_mode: false
|
||||||
|
tags: always
|
||||||
|
- name: Refresh inventory with opentofu available
|
||||||
|
ansible.builtin.meta: refresh_inventory
|
||||||
|
tags: always
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
---
|
|
||||||
- name: Unlock backups
|
|
||||||
hosts: serguzim_net
|
|
||||||
become: true
|
|
||||||
tasks:
|
|
||||||
- name: Verify backup
|
|
||||||
ansible.builtin.command:
|
|
||||||
cmd: autorestic -v check
|
|
||||||
chdir: "{{ (services_path, 'backup') | path_join }}"
|
|
||||||
changed_when: false
|
|
||||||
become: true
|
|
||||||
register: cmd_result_verify
|
|
||||||
until: "cmd_result_verify is not failed"
|
|
||||||
retries: 10
|
|
||||||
delay: 10
|
|
||||||
Loading…
Reference in a new issue