mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-04 07:37:20 +02:00
Update to 2022-02-09 17:00
This commit is contained in:
20
roles/system_proxy/tasks/RedHat.yml
Normal file
20
roles/system_proxy/tasks/RedHat.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
|
||||
- name: Configure proxy for yum
|
||||
ini_file:
|
||||
path: /etc/yum.conf
|
||||
section: main
|
||||
option: proxy
|
||||
value: "{{ (system_proxy is defined and system_proxy != '') | ternary(system_proxy,'') }}"
|
||||
state: "{{ (system_proxy is defined and system_proxy != '') | ternary('present','absent') }}"
|
||||
tags: proxy
|
||||
|
||||
- name: Configure proxy for dnf
|
||||
ini_file:
|
||||
path: /etc/dnf/yum.conf
|
||||
section: main
|
||||
option: proxy
|
||||
value: "{{ (system_proxy is defined and system_proxy != '') | ternary(system_proxy,'') }}"
|
||||
state: "{{ (system_proxy is defined and system_proxy != '') | ternary('present','absent') }}"
|
||||
when: ansible_distribution_major_version is version('8', '>=')
|
||||
tags: proxy
|
Reference in New Issue
Block a user