Skip to content

Commit 4e67550

Browse files
committed
style: fix yamllint and align command and variable name to other tasks that do the same thing.
Signed-off-by: Jason Hendry <jason@rain.com.au>
1 parent f716f32 commit 4e67550

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tasks/section_3/cis_3.1.x.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
notify: Grub update
1313

1414
- name: "3.1.1 | PATCH | Ensure system is checked to determine if IPv6 is enabled | Check grub cmdline linux"
15-
ansible.builtin.shell: 'cat /etc/default/grub | grep ^GRUB_CMDLINE_LINUX'
15+
ansible.builtin.shell: grep "GRUB_CMDLINE_LINUX=" /etc/default/grub | cut -f2 -d'"'
1616
changed_when: false
1717
failed_when: false
1818
check_mode: false
19-
register: ubtu22cis_3_1_1_GRUB_CMDLINE_LINUX
19+
register: ubtu22cis_3_1_1_cmdline_settings
2020
when: ubtu22cis_ipv6_disable == 'grub'
2121

2222
- name: "3.1.1 | PATCH | Ensure system is checked to determine if IPv6 is enabled | Insert ipv6.disable if it doesn't exist"
@@ -26,8 +26,8 @@
2626
line: '\1 ipv6.disable=1"'
2727
backrefs: true
2828
when:
29-
- ipv6disable_replaced is not changed
30-
- "'ipv6.disable' not in ubtu22cis_3_1_1_GRUB_CMDLINE_LINUX.stdout"
29+
- ipv6disable_replaced is not changed
30+
- "'ipv6.disable' not in ubtu22cis_3_1_1_cmdline_settings.stdout"
3131
notify: Grub update
3232

3333
- name: "3.1.1 | PATCH | Ensure system is checked to determine if IPv6 is enabled | Remove net.ipv6.conf.all.disable_ipv6"

0 commit comments

Comments
 (0)