-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathpre.yml
More file actions
31 lines (29 loc) · 954 Bytes
/
pre.yml
File metadata and controls
31 lines (29 loc) · 954 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- hosts: builder
become: no
gather_facts: no
tasks:
- name: Report hostname (= final image name)
command: hostname
- name: Report inventory groups
debug:
var: group_names
- hosts: control:!builder
become: yes
gather_facts: false
tasks:
- name: Output OS version
command: cat /etc/redhat-release
changed_when: false
- name: Write CI-generated inventory and secrets for debugging
ansible.builtin.copy:
dest: /etc/ci-config/
src: "{{ item }}"
directory_mode: 0400
mode: 0400
owner: root
group: root
no_log: "{{ no_log | default(true) }}"
loop:
- "{{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}/inventory/hosts.yml"
- "{{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}/inventory/group_vars/all/secrets.yml"
- "{{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}/inventory/group_vars/all/test_user.yml"