Skip to content

Commit ab144f0

Browse files
authored
fix(ansible): correctly restore IPv6 disablement (#6137)
* = 0 is OK Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp> * fix Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp> --------- Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
1 parent a676189 commit ab144f0

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

ansible/roles/agnocast/tasks/main.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,13 @@
3232
become: true
3333

3434
- name: Restore original IPv6 settings # noqa: no-changed-when
35-
ansible.builtin.command: >
36-
sysctl -w {{ item }}
35+
ansible.posix.sysctl:
36+
name: "{{ item.split('=')[0] | trim }}"
37+
value: 0
38+
sysctl_set: true
39+
state: present
3740
loop: "{{ ipv6_settings.stdout_lines }}"
38-
when: item is search('=0')
41+
when: item is search('=\\s*0')
3942
become: true
4043

4144
- name: Update apt cache

0 commit comments

Comments
 (0)