Tons of updates including erpnext, fusionauth, kong, elasticsearch, postgres-12, opennebula-5.10...

This commit is contained in:
2020-04-15 18:46:59 -06:00
parent 957ff8bb8e
commit 0d76f1eb12
73 changed files with 4532 additions and 29 deletions

View File

@@ -17,11 +17,19 @@
changed_when: false
register: user_home
# Notice both group and user is {{id}}, so they are the same!
# Create group by same ID as user
- name: Creating group {{ user }}
group:
name: '{{ user }}'
gid: '{{ id }}'
when: gid is undefined
# Create group by options gid
- name: Creating group {{ user }}
group:
name: '{{ user }}'
gid: '{{ gid }}'
when: gid is defined
- name: Creating user {{ user }}
user:
@@ -53,6 +61,12 @@
line: '{{ user }} ALL=(ALL) NOPASSWD:ALL'
when: '"sudo" in group'
# Create users ~/.ssh directory
- name: Creating {{ user }} ~/.ssh directory
file:
path: '{{ "~" + user | expanduser }}/.ssh'
state: directory
# Authorize users SSH keys
# NOTE, when: ssh_authorize|bool == true
# IS working, BUT even if ssh_authorize = false the
@@ -66,13 +80,6 @@
- 'keys/{{ user }}.key.pub'
when: ssh_authorize|default(true)|bool
# Create users ~/.ssh directory
- name: Creating {{ user }} ~/.ssh directory
file:
path: '{{ "~" + user | expanduser }}/.ssh'
state: directory
when: ssh_keys|default(false)|bool
# Create users public key
- name: Copying {{ user }} SSH public key
copy: