risotto/ansible/playbook.yml
2022-12-21 16:35:58 +01:00

42 lines
1.1 KiB
YAML

---
- name: Risotto
hosts: all
tasks:
- name: "Configure the host"
include_tasks: host.yml
when: configure_host == true
- name: "Remove compressed files directory"
local_action:
module: file
path: /tmp/new_configurations
state: absent
- name: "Create compressed configuration files directory"
local_action:
module: file
path: /tmp/new_configurations
state: directory
mode: 0700
- name: "Remove compressed templates files directory"
local_action:
module: file
path: /tmp/new_templates
state: absent
when: copy_template
- name: "Create compressed templates files directory"
local_action:
module: file
path: /tmp/new_templates
state: directory
mode: 0700
when: copy_template
- name: "Prepare machine configuration"
include_tasks: machine.yml
loop: "{{ vars | machineslist(only=only_machine) }}"
- name: "Install and apply configurations"
include_tasks: machines.yml