refactor(schema): rename nested dict keys and simplify validation
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
group: root
|
||||
mode: "0644"
|
||||
|
||||
- name: Remove deprecated attr2 and disable large extent
|
||||
- name: Adjust XFS mount options and disable large extent
|
||||
when: os in ["almalinux", "rocky", "rhel"] and filesystem == "xfs"
|
||||
ansible.builtin.replace:
|
||||
path: /mnt/etc/fstab
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
changed_when: configuration_user_result.rc == 0
|
||||
|
||||
- name: Ensure .ssh directory exists
|
||||
when: system_cfg.user.public_key | length > 0
|
||||
when: system_cfg.user.key | length > 0
|
||||
ansible.builtin.file:
|
||||
path: /mnt/home/{{ system_cfg.user.name }}/.ssh
|
||||
state: directory
|
||||
@@ -27,10 +27,10 @@
|
||||
mode: "0700"
|
||||
|
||||
- name: Add SSH public key to authorized_keys
|
||||
when: system_cfg.user.public_key | length > 0
|
||||
when: system_cfg.user.key | length > 0
|
||||
ansible.builtin.lineinfile:
|
||||
path: /mnt/home/{{ system_cfg.user.name }}/.ssh/authorized_keys
|
||||
line: "{{ system_cfg.user.public_key }}"
|
||||
line: "{{ system_cfg.user.key }}"
|
||||
owner: 1000
|
||||
group: 1000
|
||||
mode: "0600"
|
||||
|
||||
Reference in New Issue
Block a user