configure-mirrors: make separate template directories for each platform
This keeps each platform's "/etc" template files in a separate top-level directory. Additionally, we add a distro major version match to the task import and rename centos7 (in preparation for centos8). Change-Id: If65d51a27e30311b1da20522afb6dbce7ee6cf35
This commit is contained in:
parent
7755ef1b8d
commit
2462d16322
@ -7,6 +7,7 @@
|
|||||||
- name: Include OS-specific variables
|
- name: Include OS-specific variables
|
||||||
include_vars: "{{ item }}"
|
include_vars: "{{ item }}"
|
||||||
with_first_found:
|
with_first_found:
|
||||||
|
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml"
|
||||||
- "{{ ansible_distribution }}.{{ ansible_architecture }}.yaml"
|
- "{{ ansible_distribution }}.{{ ansible_architecture }}.yaml"
|
||||||
- "{{ ansible_distribution }}.yaml"
|
- "{{ ansible_distribution }}.yaml"
|
||||||
- "{{ ansible_os_family }}.yaml"
|
- "{{ ansible_os_family }}.yaml"
|
||||||
@ -25,6 +26,7 @@
|
|||||||
include: "{{ item }}"
|
include: "{{ item }}"
|
||||||
static: no
|
static: no
|
||||||
with_first_found:
|
with_first_found:
|
||||||
|
- "mirror/{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml"
|
||||||
- "mirror/{{ ansible_distribution }}.yaml"
|
- "mirror/{{ ansible_distribution }}.yaml"
|
||||||
- "mirror/{{ ansible_os_family }}.yaml"
|
- "mirror/{{ ansible_os_family }}.yaml"
|
||||||
- "mirror/default.yaml"
|
- "mirror/default.yaml"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
owner: root
|
owner: root
|
||||||
src: "{{ item }}.j2"
|
src: "centos7/{{ item }}.j2"
|
||||||
with_items:
|
with_items:
|
||||||
- etc/yum.repos.d/CentOS-Base.repo
|
- etc/yum.repos.d/CentOS-Base.repo
|
||||||
- etc/yum.repos.d/epel.repo
|
- etc/yum.repos.d/epel.repo
|
@ -5,7 +5,7 @@
|
|||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
owner: root
|
owner: root
|
||||||
src: "{{ item }}.j2"
|
src: "apt/{{ item }}.j2"
|
||||||
with_items:
|
with_items:
|
||||||
- etc/apt/sources.list.d/default.list
|
- etc/apt/sources.list.d/default.list
|
||||||
- etc/apt/sources.list.d/updates.list
|
- etc/apt/sources.list.d/updates.list
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
owner: root
|
owner: root
|
||||||
src: "{{ item }}.j2"
|
src: "fedora/{{ item }}.j2"
|
||||||
with_items:
|
with_items:
|
||||||
- etc/yum.repos.d/fedora.repo
|
- etc/yum.repos.d/fedora.repo
|
||||||
- etc/yum.repos.d/fedora-updates.repo
|
- etc/yum.repos.d/fedora-updates.repo
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
owner: root
|
owner: root
|
||||||
src: "{{ item }}.j2"
|
src: "suse/{{ item }}.j2"
|
||||||
with_items:
|
with_items:
|
||||||
- etc/zypp/repos.d/repo-oss.repo
|
- etc/zypp/repos.d/repo-oss.repo
|
||||||
notify:
|
notify:
|
||||||
@ -28,7 +28,7 @@
|
|||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
owner: root
|
owner: root
|
||||||
src: etc/zypp/repos.d/repo-update.repo.j2
|
src: suse/etc/zypp/repos.d/repo-update.repo.j2
|
||||||
notify:
|
notify:
|
||||||
- Update zypper cache
|
- Update zypper cache
|
||||||
when: not ansible_distribution | search("Tumbleweed")
|
when: not ansible_distribution | search("Tumbleweed")
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
owner: root
|
owner: root
|
||||||
src: "{{ item }}.j2"
|
src: "apt/{{ item }}.j2"
|
||||||
with_items:
|
with_items:
|
||||||
- etc/apt/sources.list
|
- etc/apt/sources.list
|
||||||
- etc/apt/apt.conf.d/99unauthenticated
|
- etc/apt/apt.conf.d/99unauthenticated
|
||||||
|
Loading…
Reference in New Issue
Block a user