Gather fai "/etc" configuration in one file
This commit is contained in:
parent
814c81c3b6
commit
3dea14759d
|
@ -13,18 +13,33 @@
|
||||||
- fai_conf
|
- fai_conf
|
||||||
|
|
||||||
### "/etc/fai/apt" GETS COPIED TO NFSROOT BY "fai-make-nfsroot"
|
### "/etc/fai/apt" GETS COPIED TO NFSROOT BY "fai-make-nfsroot"
|
||||||
|
|
||||||
|
- name: "Create apt configuration directories for nfsroot"
|
||||||
|
become: true
|
||||||
|
vars:
|
||||||
|
paths:
|
||||||
|
- "{{ fai_etc_dir }}/apt/sources.list.d"
|
||||||
|
- "{{ fai_etc_dir }}/apt/preferences.d"
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: directory
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0755'
|
||||||
|
loop: "{{ paths }}"
|
||||||
|
|
||||||
- name: "Copy hosts '{{ src }}' to nfsroot"
|
- name: "Copy hosts '{{ src }}' to nfsroot"
|
||||||
become: true
|
become: true
|
||||||
vars:
|
vars:
|
||||||
src: "/etc/apt/sources.list.d"
|
src: "/etc/apt/sources.list.d/"
|
||||||
dest: "/etc/fai/apt/sources.list.d"
|
dest: "{{ fai_etc_dir }}/apt/sources.list.d"
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
remote_src: true
|
remote_src: true
|
||||||
recursive: true
|
|
||||||
src: "{{ src }}"
|
src: "{{ src }}"
|
||||||
dest: "{{ dest }}"
|
dest: "{{ dest }}"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
mode: '0755'
|
||||||
when:
|
when:
|
||||||
- debian_release_fai == debian_release_nfsroot
|
- debian_release_fai == debian_release_nfsroot
|
||||||
notify:
|
notify:
|
||||||
|
@ -36,8 +51,8 @@
|
||||||
become: true
|
become: true
|
||||||
vars:
|
vars:
|
||||||
paths:
|
paths:
|
||||||
- "/etc/fai/apt/sources.list"
|
- "{{ fai_etc_dir }}/apt/sources.list"
|
||||||
- "/etc/fai/apt/sources.list~"
|
- "{{ fai_etc_dir }}/apt/sources.list~"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
@ -89,6 +104,8 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
when:
|
||||||
|
- debian_release_fai == debian_release_nfsroot
|
||||||
notify:
|
notify:
|
||||||
- Force rebuild nfsroot
|
- Force rebuild nfsroot
|
||||||
tags:
|
tags:
|
||||||
|
@ -109,9 +126,28 @@
|
||||||
notify:
|
notify:
|
||||||
- Force rebuild nfsroot
|
- Force rebuild nfsroot
|
||||||
when:
|
when:
|
||||||
- falsen
|
- debian_release_fai != debian_release_nfsroot
|
||||||
notify:
|
|
||||||
- Force rebuild nfsroot
|
- name: "Create configuration for nfsroot"
|
||||||
|
become: true
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: "etc/fai/nfsroot.conf.j2"
|
||||||
|
dest: "{{ fai_etc_dir }}/nfsroot.conf"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0644'
|
||||||
|
notify:
|
||||||
|
- Force rebuild nfsroot
|
||||||
|
|
||||||
|
- name: "Create package_config for nfsroot"
|
||||||
|
become: true
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: "etc/fai/NFSROOT.j2"
|
||||||
|
dest: "{{ fai_etc_dir }}/NFSROOT"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0644'
|
||||||
|
register: "etc_fai_NFSROOT"
|
||||||
notify:
|
notify:
|
||||||
- Force rebuild nfsroot
|
- Force rebuild nfsroot
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue