Browse Source

Les rôles actifs sont définis dans la config

jabberserver
southerntofu 2 years ago
parent
commit
def091d76f
  1. 1
      config.default.yml
  2. 1
      config.yml
  3. 2
      recette.yml
  4. 8
      roles/common/tasks/main.yml

1
config.default.yml

@ -1,4 +1,5 @@
hostname: mondomaine.net
roles: [ webserver ]
packages:
debian: [ htop, tmux, vim, emacs, mutt, mosh ]
rust: [ lsd ]

1
config.yml

@ -1,4 +1,5 @@
hostname: fr.tild3.org
roles: [ webserver, rust ]
packages:
debian: [ subversion, mercurial, htop, tmux, vim, emacs, mutt, weechat, elinks, rsync, dnsutils, make, g++, libssl-dev, mosh, gopher ]
rust: [ lsd ]

2
recette.yml

@ -2,5 +2,3 @@
hosts: all
roles:
- common
- webserver
- rust

8
roles/common/tasks/main.yml

@ -25,3 +25,11 @@
- include: tor.yml
- include: users.yml
- name: Exécuter les rôles définis dans la config
include_role:
name: "{{ current_role }}"
loop: "{{ roles }}"
loop_control:
loop_var: current_role
when: roles is defined

Loading…
Cancel
Save