Skip to content

Commit

Permalink
Remove entries with regexp regardeless of password specified, fix mode
Browse files Browse the repository at this point in the history
  • Loading branch information
spetrosi committed Sep 30, 2021
1 parent acc112e commit fad0ad0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tasks/main-blivet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@
- name: manage /etc/crypttab to account for changes we just made
lineinfile:
path: /etc/crypttab
# The line option is used when `state: present`
line: "{{ entry.name }} {{ entry.backing_device }} {{ entry.password }}"
# The regexp option is used when `state: absent` to remove entries
# regardless of password
regexp: ^{{ entry.name }} {{ entry.backing_device }}
state: "{{ entry.state }}"
create: true
mode: "{{ __storage_crypttab.stat.mode | d('0600') }}"
Expand Down

0 comments on commit fad0ad0

Please sign in to comment.