moved user tasks to an own file
so they can be called from other roles
This commit is contained in:
@@ -23,18 +23,7 @@
|
|||||||
- import_tasks: system_setup/openssh.yml
|
- import_tasks: system_setup/openssh.yml
|
||||||
- import_tasks: system_setup/scripts.yml
|
- import_tasks: system_setup/scripts.yml
|
||||||
|
|
||||||
# Make sure users exist on the system
|
- import_tasks: users.yml
|
||||||
- import_tasks: users/root.yml
|
|
||||||
- import_tasks: users/rene.yml
|
|
||||||
- import_tasks: users/ansible.yml
|
|
||||||
|
|
||||||
- name: users | all | repeating tasks for all users
|
|
||||||
include_tasks: users/all.yml
|
|
||||||
loop:
|
|
||||||
- rene
|
|
||||||
- root
|
|
||||||
loop_control:
|
|
||||||
loop_var: user
|
|
||||||
|
|
||||||
# Set up the ansible environment
|
# Set up the ansible environment
|
||||||
# - import_tasks: ansible_setup.yml
|
# - import_tasks: ansible_setup.yml
|
||||||
|
|||||||
12
roles/base/tasks/users.yml
Normal file
12
roles/base/tasks/users.yml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Make sure users exist on the system
|
||||||
|
- import_tasks: users/root.yml
|
||||||
|
- import_tasks: users/rene.yml
|
||||||
|
- import_tasks: users/ansible.yml
|
||||||
|
|
||||||
|
- name: users | all | repeating tasks for all users
|
||||||
|
include_tasks: users/all.yml
|
||||||
|
loop:
|
||||||
|
- rene
|
||||||
|
- root
|
||||||
|
loop_control:
|
||||||
|
loop_var: user
|
||||||
@@ -10,4 +10,8 @@
|
|||||||
- include_tasks: utilities/snmpd.yml
|
- include_tasks: utilities/snmpd.yml
|
||||||
- include_tasks: utilities/wireguard.yml
|
- include_tasks: utilities/wireguard.yml
|
||||||
|
|
||||||
|
- include_role:
|
||||||
|
name: base
|
||||||
|
tasks_from: users
|
||||||
|
|
||||||
# vim: ts=2 sw=2
|
# vim: ts=2 sw=2
|
||||||
|
|||||||
Reference in New Issue
Block a user