diff --git a/slococo/playground/roles/local_accounts/README.md b/slococo/playground/roles/local_accounts/README.md index 8c30c32..7dd8776 100644 --- a/slococo/playground/roles/local_accounts/README.md +++ b/slococo/playground/roles/local_accounts/README.md @@ -20,7 +20,7 @@ Example Playbook ```yaml - hosts: servers vars: - local_users: + accounts: - name: test_user1 shell: /bin/bash userid: 1001 diff --git a/slococo/playground/roles/local_accounts/defaults/main.yml b/slococo/playground/roles/local_accounts/defaults/main.yml index 26d8306..09bff2d 100644 --- a/slococo/playground/roles/local_accounts/defaults/main.yml +++ b/slococo/playground/roles/local_accounts/defaults/main.yml @@ -1,2 +1,2 @@ --- -local_users: [] \ No newline at end of file +accounts: [] diff --git a/slococo/playground/roles/local_accounts/handlers/main.yml b/slococo/playground/roles/local_accounts/handlers/main.yml index 73b314f..ed97d53 100644 --- a/slococo/playground/roles/local_accounts/handlers/main.yml +++ b/slococo/playground/roles/local_accounts/handlers/main.yml @@ -1 +1 @@ ---- \ No newline at end of file +--- diff --git a/slococo/playground/roles/local_accounts/meta/argument_specs.yml b/slococo/playground/roles/local_accounts/meta/argument_specs.yml index 4f03604..a201ca2 100644 --- a/slococo/playground/roles/local_accounts/meta/argument_specs.yml +++ b/slococo/playground/roles/local_accounts/meta/argument_specs.yml @@ -3,7 +3,7 @@ argument_specs: main: short_description: Ansible Role to create local users options: - local_users: + accounts: type: list required: true elements: dict @@ -34,4 +34,4 @@ argument_specs: type: list required: false default: "" - description: The primary group for the local user. \ No newline at end of file + description: The primary group for the local user. diff --git a/slococo/playground/roles/local_accounts/meta/main.yml b/slococo/playground/roles/local_accounts/meta/main.yml index 59c9a91..4780e85 100644 --- a/slococo/playground/roles/local_accounts/meta/main.yml +++ b/slococo/playground/roles/local_accounts/meta/main.yml @@ -4,6 +4,6 @@ galaxy_info: company: cloudWerkstatt license: MIT min_ansible_version: 2.12.0 - galaxy_tags: ['users'] + galaxy_tags: ['users', 'creation'] dependencies: [] diff --git a/slococo/playground/roles/local_accounts/tasks/main.yml b/slococo/playground/roles/local_accounts/tasks/main.yml index f6d7f7e..bb89fed 100644 --- a/slococo/playground/roles/local_accounts/tasks/main.yml +++ b/slococo/playground/roles/local_accounts/tasks/main.yml @@ -8,5 +8,4 @@ home: "{{ item.home | default(omit) }}" groups: "{{ item.groups | default(omit) }}" generate_ssh_key: yes - loop: "{{ local_users }}" - become: true + loop: "{{ accounts }}" diff --git a/slococo/playground/roles/local_accounts/tests/inventory b/slococo/playground/roles/local_accounts/tests/inventory index 878877b..2fbb50c 100644 --- a/slococo/playground/roles/local_accounts/tests/inventory +++ b/slococo/playground/roles/local_accounts/tests/inventory @@ -1,2 +1 @@ localhost - diff --git a/slococo/playground/roles/local_accounts/tests/test.yml b/slococo/playground/roles/local_accounts/tests/test.yml index 3ad87db..22bbbe5 100644 --- a/slococo/playground/roles/local_accounts/tests/test.yml +++ b/slococo/playground/roles/local_accounts/tests/test.yml @@ -3,6 +3,7 @@ hosts: localhost connection: local gather_facts: no + become: true vars: local_users: