-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathcci_worker.yml
78 lines (68 loc) · 1.83 KB
/
cci_worker.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
- name: Automate VM with Ansible
hosts: all
gather_facts: true
become: yes
vars_files:
- vars/vault.yml
- vars/cci.yml
- vars/java.yml
pre_tasks:
- name: "Load Secrets from Vault"
ansible.builtin.include_role:
name: "vault"
- name: Check registration status
ansible.builtin.command: subscription-manager list
register: registration_status
ignore_errors: true
- name: Register if not already registered
when: registration_status.rc != 0
community.general.redhat_subscription:
state: present
username: "{{ cci_worker_rhel_subscription_username }}"
password: "{{ cci_worker_rhel_subscription_password }}"
autosubscribe: yes
force_register: true
- name: Update yum
ansible.builtin.yum:
name: "*"
state: latest
- name: Install pip3
ansible.builtin.package:
name: python3-pip
- name: "Install hvac python library"
ansible.builtin.pip:
name: hvac>=1.2.1
executable: pip3
- ansible.builtin.include_role:
name: fast_yum_install
vars:
package_name: "{{ pretaskfiles }}"
with_items:
- firewalld
- zip
- podman
- podman-docker
- jq
- git
loop_control:
loop_var: pretaskfiles
tasks:
- ansible.builtin.include_role:
name: "{{ taskfiles }}"
with_items:
- cci_worker
- sshd
- sudoers
- ssh
- java
- java_certs
- old_releases
loop_control:
loop_var: taskfiles
post_tasks:
- name: "Ensure jaegertracing docker image is downloaded for tests"
containers.podman.podman_image:
name: "quay.io/jaegertracing/all-in-one:latest"
become: yes
become_user: "{{cci_worker_username}}"