diff --git a/README.md b/README.md index 1730b8e..97afac6 100644 --- a/README.md +++ b/README.md @@ -11,5 +11,6 @@ WINDOWS Ansible role to create a little base Setup for my Ansible Managed Window + See [ansible docs](https://docs.ansible.com/ansible/latest/collections/community/general/passwordstore_lookup.html) + Have a password store setup. Either create a symlink from pass to gopass or use pass nativly. -+ **Language: DE** - + We work with the German Group Names! ++ **Language: DE or EN** + + Define the ``win_base_init__os_language`` variable to fit your Group Names ``('de' or 'en' are supported values)``. + + It looks like Windows is using other Group Names depending on your OS language settings. diff --git a/defaults/main.yml b/defaults/main.yml index b46b1f9..1efe2e2 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -5,3 +5,7 @@ win_base_init__packages: - Firefox - mpvio - vlc + +win_base_init__os_language: 'en' +# 'en' for english Group names like 'Users' +# 'de' for german group names like 'Benutzer' diff --git a/tasks/ansible_user.yml b/tasks/ansible_user.yml index 41358fc..6cca07b 100644 --- a/tasks/ansible_user.yml +++ b/tasks/ansible_user.yml @@ -16,7 +16,4 @@ password_expired: false password_never_expires: true user_cannot_change_password: true - groups: - - 'Benutzer' - - 'Ansibles' - - 'Administratoren' + groups: "{{ win_base_init__os_groups }} diff --git a/tasks/main.yml b/tasks/main.yml index 921dd4c..bb4d0b2 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,4 +1,7 @@ --- +- name: load variables depending on language + ansible.builtin.include_tasks: variables.yml + - name: create Ansible Windows Group and User ansible.builtin.include_tasks: ansible_user.yml diff --git a/tasks/variables.yml b/tasks/variables.yml new file mode 100644 index 0000000..efb275e --- /dev/null +++ b/tasks/variables.yml @@ -0,0 +1,10 @@ +--- +- name: Load language specific windows variables + include_vars: "{{ lookup('first_found', params) }}" + vars: + params: + files: + - "windows_{{ win_base_init__os_language }}.yml" + - 'windows_default.yml' + paths: + - 'vars' diff --git a/vars/windows_de.yml b/vars/windows_de.yml new file mode 100644 index 0000000..2f350c8 --- /dev/null +++ b/vars/windows_de.yml @@ -0,0 +1,5 @@ +--- +win_base_init__os_groups: + - 'Benutzer' + - 'Ansibles' + - 'Administratoren' diff --git a/vars/windows_default.yml b/vars/windows_default.yml new file mode 100644 index 0000000..734824f --- /dev/null +++ b/vars/windows_default.yml @@ -0,0 +1,5 @@ +--- +win_base_init__os_groups: + - 'S-1-5-32-545' + - 'Ansibles' + - 'S-1-5-32-544' diff --git a/vars/windows_en.yml b/vars/windows_en.yml new file mode 100644 index 0000000..20100d1 --- /dev/null +++ b/vars/windows_en.yml @@ -0,0 +1,5 @@ +--- +win_base_init__os_groups: + - 'Users' + - 'Ansibles' + - 'Administrators'