diff options
| author | spmfox <spmfox@foxwd.com> | 2024-08-29 16:03:45 -0400 |
|---|---|---|
| committer | spmfox <spmfox@foxwd.com> | 2024-08-29 16:03:45 -0400 |
| commit | 0445fed560e6fff60fed80a5c15b38874524ec06 (patch) | |
| tree | ab2e706f5947db94cea575833962585a96b84b40 /roles/host/tasks/unprivileged-port.yml | |
| parent | 31bc4f2c269ce5c66cec4dfbd9a2ce7697d1dba0 (diff) | |
making naming more consistant
Diffstat (limited to 'roles/host/tasks/unprivileged-port.yml')
| -rw-r--r-- | roles/host/tasks/unprivileged-port.yml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/roles/host/tasks/unprivileged-port.yml b/roles/host/tasks/unprivileged-port.yml new file mode 100644 index 0000000..c724e49 --- /dev/null +++ b/roles/host/tasks/unprivileged-port.yml @@ -0,0 +1,11 @@ +- name: Set unprivileged ports sysctl parameter in /etc/sysctl.d/50-UnprivilegedPort.conf + ansible.builtin.lineinfile: + path: "/etc/sysctl.d/50-UnprivilegedPort.conf" + regexp: "^net.ipv4.ip_unprivileged_port_start=" + line: "net.ipv4.ip_unprivileged_port_start={{ host_unprivileged_port_start }}" + create: true + register: sysctl + +- name: Reload sysctl + ansible.builtin.shell: "sysctl -p /etc/sysctl.d/50-UnprivilegedPort.conf" + when: sysctl.changed |
