-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup_env.yaml
73 lines (61 loc) · 1.79 KB
/
setup_env.yaml
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
---
- hosts: all
remote_user: root
gather_facts: no
tasks:
- name: Install Ansible
raw: |
subscription-manager register --force --auto-attach --username="{{ rhn_user_name }}" --password="{{ rhn_user_psw }}"
dnf install -y @python36
ln -sf /usr/bin/python3 /usr/bin/python
- name: Set Host name
shell:
cmd: |
hostnamectl set-hostname "{{ HOST_NAME }}"
hostnamectl set-hostname "{{ HOST_NAME }}" --transient
- name: Create stack user
user: name=stack
sudo: yes
- name: Add stack user to the sudoers
copy:
dest: "/etc/sudoers.d/stack"
content: "stack ALL=(root) NOPASSWD: ALL"
mode: 0440
- name: Set authorized key
authorized_key:
user: stack
state: present
key: "{{ lookup('file', 'vars/mdkey.pub') }}"
- name: Add RHEL subscriptions and attached pool
redhat_subscription:
force_register: yes
state: present
username: "{{ rhn_user_name }}"
password: "{{ rhn_user_psw }}"
pool_ids: "{{ pool_id }}"
- name: Lock the undercloud to Red Hat Enterprise Linux 8.2
shell:
cmd: subscription-manager release --set=8.2
- name: install dnf-utils
package:
name: dnf-utils
state: present
- name: Disable all RHSM repositories
rhsm_repository:
name: '*'
state: disabled
- name: Enable a RHSM repository
rhsm_repository:
name: "{{ item }}"
with_items: "{{ REPOS }}"
- name: Install Tripleoclient
package:
name: python3-tripleoclient
state: present
- name: Copy standalone-tripleo.yaml to the target node
copy:
src: templates/standalone-tripleo.yaml
dest: /usr/share/openstack-tripleo-heat-templates/environments/standalone/standalone-tripleo.yaml
backup: yes
force: yes
...