Remove cruft and add mkpasswd setup

This commit is contained in:
Joshua Boniface 2023-09-01 15:42:25 -04:00
parent 3a24e6dd8a
commit 2a72a826f5
1 changed files with 8 additions and 8 deletions

View File

@ -162,6 +162,7 @@
- dns-root-data - dns-root-data
- bind9-host - bind9-host
- dnsutils - dnsutils
- whois
- postfix - postfix
- ntp - ntp
- openssh-client - openssh-client
@ -523,18 +524,17 @@
dest: /var/home dest: /var/home
tags: users tags: users
- name: ensure group media exists # root
group: - name: generate Root password hash
name: media command: "mkpasswd --method=sha512crypt {{ root_password }}"
gid: 9000 no_log: true
state: present register: mkpasswd
tags: users tags: users
# root
- name: set Root password - name: set Root password
user: user:
name: root name: root
password: "{{ passwdhash_root }}" password: "{{ mkpasswd.stdout }}"
tags: users tags: users
- name: remove Root known_hosts - name: remove Root known_hosts
@ -656,7 +656,7 @@
name: "{{ item.name }}" name: "{{ item.name }}"
uid: "{{ item.uid }}" uid: "{{ item.uid }}"
group: operator group: operator
groups: sudo,adm,media,wireshark groups: sudo,adm,wireshark
shell: /bin/bash shell: /bin/bash
home: "/var/home/{{ item.name }}" home: "/var/home/{{ item.name }}"
createhome: yes createhome: yes