!fix(luks_ssh): Adjust dracut variable names to match new lint rule
This commit is contained in:
parent
574a5c9231
commit
64da9630c3
2 changed files with 21 additions and 21 deletions
|
@ -19,14 +19,14 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# The install location for the dracut module
|
# 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
|
# The authorized keys
|
||||||
# fields:
|
# fields:
|
||||||
# - owner - The owner of the key file
|
# - owner - The owner of the key file
|
||||||
# comment - A comment for the authorized_keys file about the key
|
# 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
|
# 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
|
# 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.
|
# 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.
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
|
|
||||||
- name: Create dracut extension
|
- name: Create dracut extension
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ dracut_ssh_dir }}"
|
path: "{{ luks_ssh_dracut_ssh_dir }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: '0755'
|
mode: "0755"
|
||||||
owner: 'root'
|
owner: "root"
|
||||||
group: 'root'
|
group: "root"
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Add SSH keys for grub2
|
- name: Add SSH keys for grub2
|
||||||
|
@ -33,29 +33,29 @@
|
||||||
state: present
|
state: present
|
||||||
key: "{{ lookup('file', item.ssh_key) }}"
|
key: "{{ lookup('file', item.ssh_key) }}"
|
||||||
comment: "{{ item.owner }} - {{ item.comment }} | Managed by Ansible"
|
comment: "{{ item.owner }} - {{ item.comment }} | Managed by Ansible"
|
||||||
path: "{{ dracut_ssh_dir }}/authorized_keys"
|
path: "{{ luks_ssh_dracut_ssh_dir }}/authorized_keys"
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ dracut_authorized_keys }}"
|
- "{{ luks_ssh_dracut_authorized_keys }}"
|
||||||
become: true
|
become: true
|
||||||
notify: Regenerate dracut
|
notify: Regenerate dracut
|
||||||
|
|
||||||
- name: Copy module setup file
|
- name: Copy module setup file
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "module-setup.sh"
|
src: "module-setup.sh"
|
||||||
dest: "{{ dracut_ssh_dir }}/module-setup.sh"
|
dest: "{{ luks_ssh_dracut_ssh_dir }}/module-setup.sh"
|
||||||
mode: '0755'
|
mode: "0755"
|
||||||
owner: 'root'
|
owner: "root"
|
||||||
group: 'root'
|
group: "root"
|
||||||
become: true
|
become: true
|
||||||
notify: Regenerate dracut
|
notify: Regenerate dracut
|
||||||
|
|
||||||
- name: Copy module files
|
- name: Copy module files
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
dest: "{{ dracut_ssh_dir }}/{{ item }}"
|
dest: "{{ luks_ssh_dracut_ssh_dir }}/{{ item }}"
|
||||||
mode: '0644'
|
mode: "0644"
|
||||||
owner: 'root'
|
owner: "root"
|
||||||
group: 'root'
|
group: "root"
|
||||||
become: true
|
become: true
|
||||||
with_items:
|
with_items:
|
||||||
- "sshd.service"
|
- "sshd.service"
|
||||||
|
@ -64,10 +64,10 @@
|
||||||
- name: Copy templated module files
|
- name: Copy templated module files
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
dest: "{{ dracut_ssh_dir }}/{{ item }}"
|
dest: "{{ luks_ssh_dracut_ssh_dir }}/{{ item }}"
|
||||||
mode: '0644'
|
mode: "0644"
|
||||||
owner: 'root'
|
owner: "root"
|
||||||
group: 'root'
|
group: "root"
|
||||||
become: true
|
become: true
|
||||||
with_items:
|
with_items:
|
||||||
- "sshd_config"
|
- "sshd_config"
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
- name: Ensure that GRUB_CMDLINE_LINUX_DEFAULT is present
|
- name: Ensure that GRUB_CMDLINE_LINUX_DEFAULT is present
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
path: /etc/default/grub
|
path: /etc/default/grub
|
||||||
regexp: '^GRUB_CMDLINE_LINUX_DEFAULT'
|
regexp: "^GRUB_CMDLINE_LINUX_DEFAULT"
|
||||||
line: 'GRUB_CMDLINE_LINUX_DEFAULT=""'
|
line: 'GRUB_CMDLINE_LINUX_DEFAULT=""'
|
||||||
become: true
|
become: true
|
||||||
notify: Regenerate grub config
|
notify: Regenerate grub config
|
||||||
|
|
Loading…
Add table
Reference in a new issue