You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
817 B
30 lines
817 B
3 years ago
|
---
|
||
|
- name: Enable services on installed system.
|
||
|
command: arch-chroot {{ partitioning_root_mount_point }}
|
||
|
systemctl enable {{ item }}
|
||
|
with_items:
|
||
|
- sshd
|
||
|
- NetworkManager
|
||
|
- fstrim.timer
|
||
|
changed_when: true
|
||
|
|
||
|
- name: Make sure root's .ssh directory exists.
|
||
|
file:
|
||
|
state: directory
|
||
|
path: "{{ partitioning_root_mount_point }}/root/.ssh"
|
||
|
owner: root
|
||
|
group: root
|
||
|
mode: 0700
|
||
|
|
||
|
- name: Make sure temporary key is in root's authorized_keys
|
||
|
authorized_key:
|
||
|
state: present
|
||
|
user: root
|
||
|
path: "{{ partitioning_root_mount_point }}/root/.ssh/authorized_keys"
|
||
|
key: "{{ tmp_pub_key }}"
|
||
|
manage_dir: true
|
||
|
|
||
|
- name: Update root password.
|
||
|
command: arch-chroot {{ partitioning_root_mount_point }} sh -c "echo root:{{ configure_root_password }} | chpasswd"
|
||
|
changed_when: true
|