follow sysctl.conf file symlink if linked
This commit is contained in:
parent
224e6acb3a
commit
331957c9a8
1 changed files with 17 additions and 0 deletions
|
@ -139,8 +139,25 @@
|
||||||
when: disable_ipv6_dns and not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
|
when: disable_ipv6_dns and not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
|
||||||
tags: bootstrap-os
|
tags: bootstrap-os
|
||||||
|
|
||||||
|
- name: set default sysctl file path
|
||||||
|
set_fact:
|
||||||
|
sysctl_file_path: "/etc/sysctl.d/99-sysctl.conf"
|
||||||
|
tags: bootstrap-os
|
||||||
|
|
||||||
|
- name: Stat sysctl file configuration
|
||||||
|
stat: path={{sysctl_file_path}}
|
||||||
|
register: sysctl_file_stat
|
||||||
|
tags: bootstrap-os
|
||||||
|
|
||||||
|
- name: Change sysctl file path to link source if linked
|
||||||
|
set_fact:
|
||||||
|
sysctl_file_path: "{{sysctl_file_stat.stat.lnk_source}}"
|
||||||
|
when: sysctl_file_stat.stat.islnk is defined and sysctl_file_stat.stat.islnk
|
||||||
|
tags: bootstrap-os
|
||||||
|
|
||||||
- name: Enable ip forwarding
|
- name: Enable ip forwarding
|
||||||
sysctl:
|
sysctl:
|
||||||
|
sysctl_file: "{{sysctl_file_path}}"
|
||||||
name: net.ipv4.ip_forward
|
name: net.ipv4.ip_forward
|
||||||
value: 1
|
value: 1
|
||||||
state: present
|
state: present
|
||||||
|
|
Loading…
Reference in a new issue