Merge "Ensure sudo is installed before configuring it"
This commit is contained in:
@@ -53,14 +53,6 @@
|
||||
tags:
|
||||
- openstack_hosts-config
|
||||
|
||||
- name: Ensure environment is applied during sudo
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/pam.d/sudo
|
||||
line: "session required pam_env.so readenv=1 user_readenv=0"
|
||||
regexp: "session\\s+required\\s+pam_env\\.so"
|
||||
insertbefore: "^@include"
|
||||
when: ansible_facts['distribution'] | lower == 'debian'
|
||||
|
||||
- name: Create systemd global directory
|
||||
ansible.builtin.file:
|
||||
path: /etc/systemd/system.conf.d/
|
||||
@@ -80,19 +72,6 @@
|
||||
config_type: ini
|
||||
notify: Systemd daemon reload
|
||||
|
||||
# Configure host files should apply to all nodes
|
||||
- name: Configure etc hosts files
|
||||
ansible.builtin.include_tasks: openstack_update_hosts_file.yml
|
||||
args:
|
||||
apply:
|
||||
tags:
|
||||
- openstack_hosts-config
|
||||
- openstack_hosts-file
|
||||
when:
|
||||
- (openstack_host_manage_hosts_file | bool) or (openstack_host_manage_deploy_hosts_file | bool)
|
||||
tags:
|
||||
- always
|
||||
|
||||
- name: Remove the blacklisted packages
|
||||
ansible.builtin.package:
|
||||
name: "{{ openstack_hosts_package_list | selectattr('state', 'equalto', 'absent') | map(attribute='name') | list }}"
|
||||
@@ -117,6 +96,27 @@
|
||||
tags:
|
||||
- always
|
||||
|
||||
- name: Ensure environment is applied during sudo
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/pam.d/sudo
|
||||
line: "session required pam_env.so readenv=1 user_readenv=0"
|
||||
regexp: "session\\s+required\\s+pam_env\\.so"
|
||||
insertbefore: "^@include"
|
||||
when: ansible_facts['distribution'] | lower == 'debian'
|
||||
|
||||
# Configure host files should apply to all nodes
|
||||
- name: Configure etc hosts files
|
||||
ansible.builtin.include_tasks: openstack_update_hosts_file.yml
|
||||
args:
|
||||
apply:
|
||||
tags:
|
||||
- openstack_hosts-config
|
||||
- openstack_hosts-file
|
||||
when:
|
||||
- (openstack_host_manage_hosts_file | bool) or (openstack_host_manage_deploy_hosts_file | bool)
|
||||
tags:
|
||||
- always
|
||||
|
||||
- name: Decreasing tcp_retries2 sysctl
|
||||
ansible.posix.sysctl:
|
||||
name: "net.ipv4.tcp_retries2"
|
||||
|
Reference in New Issue
Block a user