Merge "Fix configuration fastestmirror for DNF"
This commit is contained in:
@@ -13,23 +13,16 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Check to see if yum's fastestmirror plugin is present
|
- name: Configure dnf fastestmirror
|
||||||
ansible.builtin.stat:
|
|
||||||
path: /etc/yum/pluginconf.d/fastestmirror.conf
|
|
||||||
register: fastestmirror_plugin_check
|
|
||||||
|
|
||||||
- name: Configure yum's fastestmirror plugin
|
|
||||||
community.general.ini_file:
|
community.general.ini_file:
|
||||||
path: /etc/yum/pluginconf.d/fastestmirror.conf
|
path: /etc/dnf/dnf.conf
|
||||||
section: main
|
section: main
|
||||||
option: enabled
|
option: fastestmirror
|
||||||
value: "{{ (openstack_hosts_enable_yum_fastestmirror | bool) | ternary('1', '0') }}"
|
value: "{{ (openstack_hosts_enable_yum_fastestmirror | bool) | ternary('True', 'False') }}"
|
||||||
no_extra_spaces: true
|
no_extra_spaces: true
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
when:
|
|
||||||
- fastestmirror_plugin_check.stat.exists
|
|
||||||
|
|
||||||
- name: Disable requiretty for root sudo on centos
|
- name: Disable requiretty for root sudo on RHEL
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
dest: /etc/sudoers.d/openstack-ansible
|
dest: /etc/sudoers.d/openstack-ansible
|
||||||
owner: root
|
owner: root
|
||||||
@@ -70,7 +63,7 @@
|
|||||||
name: "{{ openstack_hosts_package_list | rejectattr('state', 'equalto', 'absent') | map(attribute='name') | list }}"
|
name: "{{ openstack_hosts_package_list | rejectattr('state', 'equalto', 'absent') | map(attribute='name') | list }}"
|
||||||
state: "{{ openstack_hosts_package_state }}"
|
state: "{{ openstack_hosts_package_state }}"
|
||||||
|
|
||||||
- name: Add yum repositories if they do not exist
|
- name: Add dnf repositories if they do not exist
|
||||||
ansible.builtin.yum_repository:
|
ansible.builtin.yum_repository:
|
||||||
name: "{{ repo.name }}"
|
name: "{{ repo.name }}"
|
||||||
file: "{{ repo.file | default(omit) }}"
|
file: "{{ repo.file | default(omit) }}"
|
||||||
@@ -128,7 +121,7 @@
|
|||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
- openstack_hosts_power_tool_enable | bool
|
- openstack_hosts_power_tool_enable | bool
|
||||||
- ansible_facts['distribution_major_version'] == "9"
|
- ansible_facts['distribution_major_version'] | int >= 9
|
||||||
|
|
||||||
- name: Create SSL certificate and key directories
|
- name: Create SSL certificate and key directories
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
Reference in New Issue
Block a user