forked from openstack-k8s-operators/ci-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
reproducer.yml
64 lines (57 loc) · 1.87 KB
/
reproducer.yml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
- name: Reproducer Play
hosts: "{{ cifmw_target_host | default('localhost') }}"
gather_facts: true
pre_tasks:
- name: Ensure we pass needed parameter
ansible.builtin.assert:
that:
- cifmw_use_libvirt is defined
- cifmw_use_libvirt | bool
msg: >-
Please ensure you pass "cifmw_use_libvirt: true" to the
deployment!
quiet: true
- name: Gather OS facts
ansible.builtin.setup:
gather_subset:
- "!all"
- "!min"
- "distribution"
- name: Tweak dnf configuration
become: true
community.general.ini_file:
no_extra_spaces: true
option: "{{ config.option }}"
path: "/etc/dnf/dnf.conf"
section: "{{ config.section | default('main') }}"
state: "{{ config.state | default(omit) }}"
value: "{{ config.value | default(omit) }}"
loop: "{{ cifmw_reproducer_dnf_tweaks }}"
loop_control:
label: "{{ config.option }}"
loop_var: 'config'
- name: Install custom CA if needed
ansible.builtin.import_role:
name: install_ca
- name: Setup repositories via rhos-release if needed
tags:
- packages
when:
- ansible_facts['distribution'] == 'RedHat'
- cifmw_reproducer_hp_rhos_release | bool
vars:
cifmw_repo_setup_output: /etc/yum.repos.d
cifmw_repo_setup_rhos_release_args: "rhel"
ansible.builtin.import_role:
name: repo_setup
tasks_from: rhos_release.yml
roles:
- role: ci_setup
- role: reproducer
post_tasks:
- name: Allow traffic from OSP VMs to OSP API (needed for shiftstack)
become: true
when: cifmw_allow_vms_to_reach_osp_api | default ('false') | bool
ansible.builtin.command: # noqa: command-instead-of-module
cmd: iptables -I LIBVIRT_FWI 1 -o ocpbm -j ACCEPT