mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2026-03-13 05:42:46 +01:00
build
This commit is contained in:
@@ -9,23 +9,35 @@
|
|||||||
- name: Facts
|
- name: Facts
|
||||||
ansible.builtin.setup:
|
ansible.builtin.setup:
|
||||||
when: ansible_facts.architecture is not defined
|
when: ansible_facts.architecture is not defined
|
||||||
- name: Disable mirrorlist
|
|
||||||
replace:
|
|
||||||
|
- name: Disable mirrorlist in baseos
|
||||||
|
ansible.builtin.ini_file:
|
||||||
path: /etc/yum.repos.d/rocky.repo
|
path: /etc/yum.repos.d/rocky.repo
|
||||||
regexp: '^mirrorlist='
|
section: baseos
|
||||||
replace: '#mirrorlist='
|
option: mirrorlist
|
||||||
|
state: absent
|
||||||
|
|
||||||
- name: Set BaseOS baseurl
|
- name: Set BaseOS baseurl
|
||||||
replace:
|
ansible.builtin.ini_file:
|
||||||
path: /etc/yum.repos.d/rocky.repo
|
path: /etc/yum.repos.d/rocky.repo
|
||||||
regexp: '^#?baseurl=.*(BaseOS.*|baseos$)'
|
section: baseos
|
||||||
replace: "baseurl={{ mirror_url }}/baseos/"
|
option: baseurl
|
||||||
|
value: "{{ mirror_url }}/baseos/"
|
||||||
|
|
||||||
|
- name: Disable mirrorlist in appstream
|
||||||
|
ansible.builtin.ini_file:
|
||||||
|
path: /etc/yum.repos.d/rocky.repo
|
||||||
|
section: appstream
|
||||||
|
option: mirrorlist
|
||||||
|
state: absent
|
||||||
|
|
||||||
- name: Set AppStream baseurl
|
- name: Set AppStream baseurl
|
||||||
replace:
|
ansible.builtin.ini_file:
|
||||||
path: /etc/yum.repos.d/rocky.repo
|
path: /etc/yum.repos.d/rocky.repo
|
||||||
regexp: '^#?baseurl=.*AppStream.*'
|
section: appstream
|
||||||
replace: "baseurl={{ mirror_url }}/appstream/"
|
option: baseurl
|
||||||
|
value: "{{ mirror_url }}/appstream/"
|
||||||
|
|
||||||
- name: Clean DNF cache
|
- name: Clean DNF cache
|
||||||
command: dnf clean all
|
command: dnf clean all
|
||||||
|
|||||||
Reference in New Issue
Block a user