Introduce a blank template for roles.

This commit is contained in:
Tom Alexander 2022-10-11 22:01:06 -04:00
parent 322c5bc711
commit 8e5e91bbce
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
14 changed files with 40 additions and 4 deletions

@ -0,0 +1 @@
# foo: []

@ -0,0 +1,4 @@
# - name: restart foo
# service:
# name: foo
# state: restarted

@ -0,0 +1,2 @@
# dependencies:
# - users

@ -0,0 +1,14 @@
- import_tasks: tasks/freebsd.yaml
when: 'os_flavor == "freebsd"'
- import_tasks: tasks/linux.yaml
when: 'os_flavor == "linux"'
- include_tasks:
file: tasks/peruser.yaml
apply:
become: yes
become_user: "{{ initialize_user }}"
loop: "{{ users | dict2items | community.general.json_query('[?value.initialize==`true`].key') }}"
loop_control:
loop_var: initialize_user

@ -0,0 +1,2 @@
- import_tasks: tasks/common.yaml
when: foo is defined

@ -0,0 +1,8 @@
- include_role:
name: per_user
- import_tasks: tasks/peruser_freebsd.yaml
when: 'os_flavor == "freebsd"'
- import_tasks: tasks/peruser_linux.yaml
when: 'os_flavor == "linux"

@ -1,4 +0,0 @@
- name: restart zrepl
service:
name: zrepl
state: restarted

@ -3,3 +3,12 @@
- import_tasks: tasks/linux.yaml
when: 'os_flavor == "linux"'
- include_tasks:
file: tasks/peruser.yaml
apply:
become: yes
become_user: "{{ initialize_user }}"
loop: "{{ users | dict2items | community.general.json_query('[?value.initialize==`true`].key') }}"
loop_control:
loop_var: initialize_user