forked from redhat-cop/casl-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcicd-provision.yml
35 lines (32 loc) · 943 Bytes
/
cicd-provision.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
---
- hosts: localhost
pre_tasks:
- include: roles/common/pre_tasks/pre_tasks.yml
roles:
- role: common
- role: cicd-common
# Provision CICD Environment
- role: openstack-create
type: "cicd"
image_name: "{{ cicd_openstack_image_name }}"
security_groups: "{{ cicd_openstack_security_groups }}"
key_name: "{{ openstack_key_name }}"
flavor_name: "{{ cicd_openstack_flavor_name }}"
register_host_group: "cicd"
node_count: "{{ cicd_instance_count }}"
disk_volume: "{{ cicd_storage_disk_volume }}"
volume_size: "{{ cicd_openstack_storage_size }}"
- hosts: cicd
remote_user: "cloud-user"
vars:
ansible_ssh_user: cloud-user
tasks:
- name: "Enable direct root access"
shell: "cat ~/.ssh/authorized_keys | sudo tee /root/.ssh/authorized_keys >/dev/null"
- hosts: cicd
roles:
- role: subscription-manager
- hosts: cicd
roles:
- cicd-common
- cicd