fixed user creation, some rc files, use hcloud host vars (ipv6)
This commit is contained in:
19
roles/user/tasks/main.yaml
Normal file
19
roles/user/tasks/main.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
|
||||
- name: copy user ssh keys
|
||||
copy:
|
||||
src: keys
|
||||
dest: "/usr/local/bastille/"
|
||||
|
||||
# The normal ansible user module can't be used here, because we're
|
||||
# talking about jail users here. I tried to patch the module to
|
||||
# support the -R flag (https://github.com/ansible/ansible/pull/84371)
|
||||
# but it makes no sense. Every single function needs to be patched so
|
||||
# that it works for jails.
|
||||
#
|
||||
# So, instead I'm just using this simple script, which does the job as
|
||||
# well.
|
||||
- name: Manage users
|
||||
loop: "{{ users }}"
|
||||
ansible.builtin.script: "bin/user.sh -u {{ item.name }} -g '{{ item.groups }}' -c {{ role_name }}-user -a {{ item.state }} -d /usr/local/bastille/jails/pubnix/root"
|
||||
|
||||
Reference in New Issue
Block a user