Separating group tasks
This commit is contained in:
parent
776b2b8397
commit
1939566096
@ -28,6 +28,12 @@
|
|||||||
dest: /etc/apt/apt.conf.d/proxy
|
dest: /etc/apt/apt.conf.d/proxy
|
||||||
when: aptfolder.stat.exists
|
when: aptfolder.stat.exists
|
||||||
|
|
||||||
|
- name: Remove redundant APT configuration
|
||||||
|
file:
|
||||||
|
path: /etc/apt/apt.conf
|
||||||
|
state: absent
|
||||||
|
when: aptfolder.stat.exists
|
||||||
|
|
||||||
# Update apt package lists after adding our proxy
|
# Update apt package lists after adding our proxy
|
||||||
- name: Update apt repo package lists from cacher
|
- name: Update apt repo package lists from cacher
|
||||||
apt: update_cache=yes force_apt_get=yes cache_valid_time=3600
|
apt: update_cache=yes force_apt_get=yes cache_valid_time=3600
|
||||||
@ -38,9 +44,12 @@
|
|||||||
user:
|
user:
|
||||||
name: ansible
|
name: ansible
|
||||||
state: present
|
state: present
|
||||||
# add to sudo
|
- name: Add deployment user to wheel group.
|
||||||
groups: sudo
|
user:
|
||||||
|
name: ansible
|
||||||
|
groups: wheel
|
||||||
append: yes
|
append: yes
|
||||||
|
when: wheel in groups
|
||||||
|
|
||||||
# Ansible user SSH pub key
|
# Ansible user SSH pub key
|
||||||
# This is a really stupid way to do it, but alas.
|
# This is a really stupid way to do it, but alas.
|
||||||
@ -91,9 +100,29 @@
|
|||||||
state: present
|
state: present
|
||||||
password: "{{ nhadmin_password | password_hash('sha512') }}"
|
password: "{{ nhadmin_password | password_hash('sha512') }}"
|
||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
# add to sudo, systemd-journal
|
|
||||||
groups: sudo,systemd-journal
|
- name: Add nhadmin to wheel group.
|
||||||
|
user:
|
||||||
|
name: nhadmin
|
||||||
|
groups: wheel
|
||||||
append: yes
|
append: yes
|
||||||
|
when: wheel in groups
|
||||||
|
|
||||||
|
- name: Add nhadmin to sudo group.
|
||||||
|
user:
|
||||||
|
name: nhadmin
|
||||||
|
groups: sudo
|
||||||
|
append: yes
|
||||||
|
when: sudo in groups
|
||||||
|
|
||||||
|
- name: Add nhadmin to systemd-journal group.
|
||||||
|
user:
|
||||||
|
name: nhadmin
|
||||||
|
groups: systemd-journal
|
||||||
|
append: yes
|
||||||
|
when: systemd-journal in groups
|
||||||
|
|
||||||
|
|
||||||
# Sysadmin user SSH pub key
|
# Sysadmin user SSH pub key
|
||||||
# This is a really stupid way to do it, but alas.
|
# This is a really stupid way to do it, but alas.
|
||||||
# This uses an environment variable named nhadmin_key in Semaphore which has the ssh-rsa pubkey.
|
# This uses an environment variable named nhadmin_key in Semaphore which has the ssh-rsa pubkey.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user