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 firewall__ssh_rule: limit
# User # User
user: "admin" user: "ops"
group: "admin" group: "ops"
# SSH Config # SSH Config
ssh__port: 4554 ssh__port: 4554

6
tasks/add_user.yml

@ -4,12 +4,12 @@
name: "{{ group }}" name: "{{ group }}"
state: present 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: lineinfile:
dest: /etc/sudoers dest: /etc/sudoers
state: present state: present
regexp: '^%admin' regexp: '^%{{ group }}'
line: '%admin ALL=(ALL) NOPASSWD: ALL' line: '%{{ group }} ALL=(ALL) NOPASSWD: ALL'
validate: 'visudo -cf %s' validate: 'visudo -cf %s'
become: yes become: yes

Loading…
Cancel
Save