-
Notifications
You must be signed in to change notification settings - Fork 16
/
bootstrap.yml
69 lines (55 loc) · 2.19 KB
/
bootstrap.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
- hosts: localhost
tasks:
- name: install packages
include_tasks: tasks/install_packages.yml
- name: check if ssh key exists
stat:
path: "{{ ansible_ssh_key }}"
register: sshkey
- name: Generate ssh key
shell:
ssh-keygen -q -N "" -f {{ ansible_ssh_key }}
when: sshkey.stat.exists == False
- name: setup infrared
include_tasks: tasks/setup_infrared.yml
when: scale_compute_vms == false
- name: change deployment timeout in infrared code
shell: |
sed -ri 's/^(\s*)(maximum\s*:\s*240\s*$)/\1maximum: 2400/' {{ ansible_user_dir }}/.infrared/plugins/tripleo-overcloud/plugin.spec
when: scale_compute_vms == true
ignore_errors: true
- name: add localhost to inventory file
add_host:
name: "localhost"
groups: "local"
ansible_connection: "local"
- name: Check if log directory exists
stat:
path: "{{ log_directory }}"
register: log_path
- name: create a directory to store logs
file:
path: "{{ log_directory }}"
state: directory
when: not (log_path.stat.isdir is defined and log_path.stat.isdir)
# use of a local time server is essential or at least a good idea for Ceph, Kerberos, Redis,
# maybe Kubernetes, and other components sensitive to server time skew
- name: default to corporate time server if lab not recognized
set_fact:
time_servers: ["clock.redhat.com", "clock2.redhat.com"]
- name: use bos.redhat.com time servers for Alias lab in Westford
set_fact:
time_servers: ["clock1.bos.redhat.com", "clock2.bos.redhat.com"]
when: lab_name == "alias"
- name: use rdu2.redhat.com time servers for Scale Lab in Raleigh NC USA
set_fact:
time_servers: ["clock1.rdu2.redhat.com", "clock.redhat.com"]
when: lab_name == "scale"
- name: pull badfish image
become: yes
shell: podman pull quay.io/quads/badfish
ignore_errors: yes
- name: set SELinux to Permissive
become: yes
shell: setenforce 0
ignore_errors: yes