risotto/ansible/playbook.yml

43 lines
1.1 KiB
YAML
Raw Normal View History

2022-10-01 22:33:11 +02:00
---
- name: Risotto
2022-12-21 16:35:58 +01:00
hosts: all
2022-10-01 22:33:11 +02:00
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
2022-12-21 16:35:58 +01:00
- 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
2022-10-01 22:33:11 +02:00
- name: "Prepare machine configuration"
include_tasks: machine.yml
loop: "{{ vars | machineslist(only=only_machine) }}"
- name: "Install and apply configurations"
include_tasks: machines.yml