Fix password hashing;Delete temporary user;Housekeeping
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
4257849ca4
commit
f15485e7c2
@ -4,4 +4,4 @@
|
|||||||
state: absent
|
state: absent
|
||||||
- name: Reboot host
|
- name: Reboot host
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
cmd: reboot now
|
cmd: /usr/sbin/reboot now
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
- name: Set root password
|
- name: Set root password
|
||||||
ansible.builtin.user:
|
ansible.builtin.user:
|
||||||
name: root
|
name: root
|
||||||
password: "{{ ovfproperties['guestinfo.rootpw'] }}"
|
password: "{{ ovfproperties['guestinfo.rootpw'] | password_hash('sha512', 65534 | random(seed=ovfproperties['guestinfo.hostname']) | string) }}"
|
||||||
generate_ssh_key: yes
|
generate_ssh_key: yes
|
||||||
ssh_key_bits: 2048
|
ssh_key_bits: 2048
|
||||||
ssh_key_file: .ssh/id_rsa
|
ssh_key_file: .ssh/id_rsa
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
- name: Store current ovfEnvironment
|
- name: Store current ovfEnvironment
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
cmd: vmtoolsd --cmd "info-get guestinfo.ovfEnv"
|
cmd: /usr/bin/vmtoolsd --cmd "info-get guestinfo.ovfEnv"
|
||||||
register: ovfenv
|
register: ovfenv
|
||||||
- name: Parse XML for vApp properties
|
- name: Parse XML for vApp properties
|
||||||
community.general.xml:
|
community.general.xml:
|
||||||
|
@ -15,3 +15,6 @@
|
|||||||
|
|
||||||
- name: Install ansible
|
- name: Install ansible
|
||||||
import_tasks: ansible.yml
|
import_tasks: ansible.yml
|
||||||
|
|
||||||
|
- name: Delete temporary users
|
||||||
|
import_tasks: users.yml
|
||||||
|
5
ansible/roles/os/tasks/users.yml
Normal file
5
ansible/roles/os/tasks/users.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
- name: Delete 'ubuntu' user
|
||||||
|
ansible.builtin.user:
|
||||||
|
name: ubuntu
|
||||||
|
state: absent
|
||||||
|
remove: yes
|
Loading…
Reference in New Issue
Block a user