!fix(luks_ssh): Adjust dracut variable names to match new lint rule

This commit is contained in:
Saibotk 2023-10-14 00:14:18 +02:00
parent 574a5c9231
commit 64da9630c3
Signed by: saibotk
GPG key ID: 67585F0065E261D5
2 changed files with 21 additions and 21 deletions

View file

@ -19,14 +19,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# The install location for the dracut module
dracut_ssh_dir: /usr/lib/dracut/modules.d/46sshd/
luks_ssh_dracut_ssh_dir: /usr/lib/dracut/modules.d/46sshd/
# The authorized keys
# fields:
# - owner - The owner of the key file
# comment - A comment for the authorized_keys file about the key
# ssh_key - A path to the ssh public key file that should be added
dracut_authorized_keys: []
luks_ssh_dracut_authorized_keys: []
# Disables the import state service
# Note: This is used to prevent issues with the import of the state that was used in the initrd, which is usually just IPv4 in DHCP mode.

View file

@ -20,11 +20,11 @@
- name: Create dracut extension
ansible.builtin.file:
path: "{{ dracut_ssh_dir }}"
path: "{{ luks_ssh_dracut_ssh_dir }}"
state: directory
mode: '0755'
owner: 'root'
group: 'root'
mode: "0755"
owner: "root"
group: "root"
become: true
- name: Add SSH keys for grub2
@ -33,29 +33,29 @@
state: present
key: "{{ lookup('file', item.ssh_key) }}"
comment: "{{ item.owner }} - {{ item.comment }} | Managed by Ansible"
path: "{{ dracut_ssh_dir }}/authorized_keys"
path: "{{ luks_ssh_dracut_ssh_dir }}/authorized_keys"
with_items:
- "{{ dracut_authorized_keys }}"
- "{{ luks_ssh_dracut_authorized_keys }}"
become: true
notify: Regenerate dracut
- name: Copy module setup file
ansible.builtin.copy:
src: "module-setup.sh"
dest: "{{ dracut_ssh_dir }}/module-setup.sh"
mode: '0755'
owner: 'root'
group: 'root'
dest: "{{ luks_ssh_dracut_ssh_dir }}/module-setup.sh"
mode: "0755"
owner: "root"
group: "root"
become: true
notify: Regenerate dracut
- name: Copy module files
ansible.builtin.copy:
src: "{{ item }}"
dest: "{{ dracut_ssh_dir }}/{{ item }}"
mode: '0644'
owner: 'root'
group: 'root'
dest: "{{ luks_ssh_dracut_ssh_dir }}/{{ item }}"
mode: "0644"
owner: "root"
group: "root"
become: true
with_items:
- "sshd.service"
@ -64,10 +64,10 @@
- name: Copy templated module files
ansible.builtin.template:
src: "{{ item }}"
dest: "{{ dracut_ssh_dir }}/{{ item }}"
mode: '0644'
owner: 'root'
group: 'root'
dest: "{{ luks_ssh_dracut_ssh_dir }}/{{ item }}"
mode: "0644"
owner: "root"
group: "root"
become: true
with_items:
- "sshd_config"
@ -89,7 +89,7 @@
- name: Ensure that GRUB_CMDLINE_LINUX_DEFAULT is present
ansible.builtin.lineinfile:
path: /etc/default/grub
regexp: '^GRUB_CMDLINE_LINUX_DEFAULT'
regexp: "^GRUB_CMDLINE_LINUX_DEFAULT"
line: 'GRUB_CMDLINE_LINUX_DEFAULT=""'
become: true
notify: Regenerate grub config