Browse Source

Fix group task and rename default user and group

master
lavenderguitar 3 years ago
parent
commit
d5d093c325
  1. 4
      defaults/main.yml
  2. 6
      tasks/add_user.yml

4
defaults/main.yml

@ -6,8 +6,8 @@ preflight__timezone: UTC
firewall__ssh_rule: limit
# User
user: "admin"
group: "admin"
user: "ops"
group: "ops"
# SSH Config
ssh__port: 4554

6
tasks/add_user.yml

@ -4,12 +4,12 @@
name: "{{ group }}"
state: present
- name: linode_preflight | add_user | Allow 'admin' group to have passwordless sudo
- name: linode_preflight | add_user | Allow admin group to have passwordless sudo
lineinfile:
dest: /etc/sudoers
state: present
regexp: '^%admin'
line: '%admin ALL=(ALL) NOPASSWD: ALL'
regexp: '^%{{ group }}'
line: '%{{ group }} ALL=(ALL) NOPASSWD: ALL'
validate: 'visudo -cf %s'
become: yes

Loading…
Cancel
Save