Skip to content

Commit a62ca70

Browse files
committed
fix exporting NHC config
1 parent e2dc409 commit a62ca70

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

ansible/final.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
- hosts: dnf_repos
22
become: yes
3+
tags: dnf_repos
34
tasks:
45
- name: Disable pulp repos
56
ansible.builtin.include_role:

ansible/roles/compute_init/tasks/export.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
tasks_from: export.yml
100100
when: "'sshd' in group_names"
101101

102-
- name: Retrieve generated NHC config
102+
- name: Export generated NHC config
103103
import_role:
104104
name: nhc
105105
tasks_from: export.yml

ansible/roles/nhc/tasks/export.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
- name: Fetch generated NHC config to control node storage
2-
ansible.builtin.fetch:
1+
- name: Slurp generated NHC configuration
2+
ansible.builtin.slurp:
33
src: /etc/nhc/nhc.conf
4-
flat: true
5-
dest: "/exports/cluster/hostconfig{{ inventory_hostname }}/nhc.conf"
4+
register: _nhc_generated_conf
5+
6+
- name: Write generated NHC configuration to control node exports
7+
ansible.builtin.copy:
8+
dest: "/exports/cluster/hostconfig/{{ inventory_hostname }}/nhc.conf"
9+
content: "{{ _nhc_generated_conf.content | b64decode }}"
10+
delegate_to: "{{ groups['control'] | first }}"

0 commit comments

Comments
 (0)