Move playbooks in a separate directory

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
Yohann D'ANELLO 2021-04-08 00:39:41 +02:00
parent 4814d7d6ae
commit 680b09ca2c
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
5 changed files with 14 additions and 7 deletions

View File

@ -1,7 +1,9 @@
[defaults] [defaults]
# Explicitely redefined some defaults to make play execution work
roles_path = ./roles
inventory = ./hosts inventory = ./hosts
timeout = 60 timeout = 60
# ask_vault_pass = True
[privilege_escalation] [privilege_escalation]
become = True become = True

View File

@ -1,6 +1,7 @@
--- ---
glob_apt: glob_apt:
mirror: "http://mirror.crans.org/" mirror: "http://mirror.crans.org/"
backports: false
extra_repositories: [] extra_repositories: []
pin: pin:
bullseye: [] bullseye: []

7
plays/apt.yml Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env ansible-playbook
---
- hosts: debian
vars:
apt: "{{ glob_apt | default({}) | combine(service_apt | default({})) | combine(loc_apt | default({})) }}"
roles:
- apt

View File

@ -1,10 +1,7 @@
#!/usr/bin/env ansible-playbook #!/usr/bin/env ansible-playbook
--- ---
- hosts: debian
vars: - import_playbook: apt.yml
apt: "{{ glob_apt | default({}) | combine(service_apt | default({})) | combine(loc_apt | default({})) }}"
roles:
- apt
- hosts: all - hosts: all
roles: roles:

View File

@ -12,7 +12,7 @@ deb {{ apt.mirror }}debian {{ ansible_distribution_release }} main contrib n
# Dépôt pour mises à jour fréquentes (volatile) # Dépôt pour mises à jour fréquentes (volatile)
deb {{ apt.mirror }}debian {{ ansible_distribution_release }}-updates main contrib non-free deb {{ apt.mirror }}debian {{ ansible_distribution_release }}-updates main contrib non-free
{% if backports | default(false) %} {% if apt.backports | default(false) %}
# Backports # Backports
deb {{ apt.mirror }}debian {{ ansible_distribution_release }}-backports main contrib non-free deb {{ apt.mirror }}debian {{ ansible_distribution_release }}-backports main contrib non-free
{% endif %} {% endif %}