mirror of
https://github.com/dev-sec/ansible-collection-hardening
synced 2024-11-10 09:14:18 +00:00
do not force type of ssh_gateway_ports (#765)
* do not force type of gatewayports-var this way it can be a bool or a string. we also now test for it Signed-off-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com> * replace yum with dnf Signed-off-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com> --------- Signed-off-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>
This commit is contained in:
parent
4af40129c6
commit
85aa1b22b3
9 changed files with 9 additions and 9 deletions
|
@ -67,7 +67,7 @@
|
||||||
- ansible_distribution_major_version|int < 20
|
- ansible_distribution_major_version|int < 20
|
||||||
|
|
||||||
- name: Install required MySQL Python libraries on RHEL
|
- name: Install required MySQL Python libraries on RHEL
|
||||||
ansible.builtin.yum:
|
ansible.builtin.dnf:
|
||||||
name: "{% if 'python3' in ansible_python_interpreter | default('') %}python36-PyMySQL{% else %}python2-PyMySQL{% endif %}"
|
name: "{% if 'python3' in ansible_python_interpreter | default('') %}python36-PyMySQL{% else %}python2-PyMySQL{% endif %}"
|
||||||
when:
|
when:
|
||||||
- ansible_os_family == "RedHat"
|
- ansible_os_family == "RedHat"
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
when: ansible_facts.os_family == 'Archlinux'
|
when: ansible_facts.os_family == 'Archlinux'
|
||||||
|
|
||||||
- name: Install required tools on RHEL # noqa ignore-errors
|
- name: Install required tools on RHEL # noqa ignore-errors
|
||||||
ansible.builtin.yum:
|
ansible.builtin.dnf:
|
||||||
name:
|
name:
|
||||||
- openssh-clients
|
- openssh-clients
|
||||||
- openssh
|
- openssh
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
when: ansible_facts.os_family == 'Archlinux'
|
when: ansible_facts.os_family == 'Archlinux'
|
||||||
|
|
||||||
- name: Install required tools on RHEL # noqa ignore-errors
|
- name: Install required tools on RHEL # noqa ignore-errors
|
||||||
ansible.builtin.yum:
|
ansible.builtin.dnf:
|
||||||
name:
|
name:
|
||||||
- openssh-clients
|
- openssh-clients
|
||||||
- openssh
|
- openssh
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
when: ansible_facts.distribution == 'Fedora'
|
when: ansible_facts.distribution == 'Fedora'
|
||||||
|
|
||||||
- name: Install packages # noqa ignore-errors
|
- name: Install packages # noqa ignore-errors
|
||||||
ansible.builtin.yum:
|
ansible.builtin.dnf:
|
||||||
name:
|
name:
|
||||||
- openssh-clients
|
- openssh-clients
|
||||||
- openssh-server
|
- openssh-server
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
- root
|
- root
|
||||||
network_ipv6_enable: true
|
network_ipv6_enable: true
|
||||||
ssh_allow_tcp_forwarding: "yes"
|
ssh_allow_tcp_forwarding: "yes"
|
||||||
ssh_gateway_ports: true
|
ssh_gateway_ports: "clientspecified"
|
||||||
ssh_allow_agent_forwarding: true
|
ssh_allow_agent_forwarding: true
|
||||||
ssh_server_permit_environment_vars: "yes"
|
ssh_server_permit_environment_vars: "yes"
|
||||||
ssh_server_accept_env_vars: PWD HTTP_PROXY
|
ssh_server_accept_env_vars: PWD HTTP_PROXY
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
when: ansible_facts.distribution == 'Fedora'
|
when: ansible_facts.distribution == 'Fedora'
|
||||||
|
|
||||||
- name: Install packages # noqa ignore-errors
|
- name: Install packages # noqa ignore-errors
|
||||||
ansible.builtin.yum:
|
ansible.builtin.dnf:
|
||||||
name:
|
name:
|
||||||
- openssh-clients
|
- openssh-clients
|
||||||
- openssh-server
|
- openssh-server
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
- name: Install sssd-clients
|
- name: Install sssd-clients
|
||||||
ansible.builtin.yum:
|
ansible.builtin.dnf:
|
||||||
name: sssd-client
|
name: sssd-client
|
||||||
state: present
|
state: present
|
||||||
when:
|
when:
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
- /etc/yum/pluginconf.d/rhnplugin.conf
|
- /etc/yum/pluginconf.d/rhnplugin.conf
|
||||||
|
|
||||||
- name: Remove deprecated or insecure packages | package-01 - package-09
|
- name: Remove deprecated or insecure packages | package-01 - package-09
|
||||||
ansible.builtin.yum:
|
ansible.builtin.dnf:
|
||||||
name: "{{ os_security_packages_list }}"
|
name: "{{ os_security_packages_list }}"
|
||||||
state: absent
|
state: absent
|
||||||
when: os_security_packages_clean | bool
|
when: os_security_packages_clean | bool
|
||||||
|
|
|
@ -88,7 +88,7 @@ argument_specs:
|
||||||
you can specify `'yes'`, `'no'`, `'all'`, `'local'`or`'remote'`.
|
you can specify `'yes'`, `'no'`, `'all'`, `'local'`or`'remote'`.
|
||||||
ssh_gateway_ports:
|
ssh_gateway_ports:
|
||||||
default: false
|
default: false
|
||||||
type: bool
|
type: raw
|
||||||
description: Set to `false` to disable binding forwarded ports to non-loopback
|
description: Set to `false` to disable binding forwarded ports to non-loopback
|
||||||
addresses. Set to `true` to force binding on wildcard address. Set to `clientspecified`
|
addresses. Set to `true` to force binding on wildcard address. Set to `clientspecified`
|
||||||
to allow the client to specify which address to bind to.
|
to allow the client to specify which address to bind to.
|
||||||
|
|
Loading…
Reference in a new issue