Skip to content

Commit

Permalink
OCTOPUS-625:added playbook roles folder
Browse files Browse the repository at this point in the history
Signed-off-by: Punith Kenchappa <[email protected]>
  • Loading branch information
pkenchap committed Mar 11, 2024
1 parent 053924e commit 3a95436
Show file tree
Hide file tree
Showing 30 changed files with 231 additions and 126 deletions.
13 changes: 13 additions & 0 deletions openstack/intel-worker/playbooks/intel-worker-cleanup-playbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
- name: Intel worker vitrual_machine delete
roles:
- vm-delete

- name: Intel worker flavor create
roles:
- flavor-delete

- name: Create RHCHOS image
hosts: all
roles:
- rhcos-image-delete
25 changes: 25 additions & 0 deletions openstack/intel-worker/playbooks/intel-worker-playbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
- name: Create RHCHOS image
hosts: all
roles:
- rhcos-image-create

Check failure on line 5 in openstack/intel-worker/playbooks/intel-worker-playbook.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

syntax-check[specific]

the role 'rhcos-image-create' was not found in /home/runner/work/ocp4-upi-multiarch-compute/ocp4-upi-multiarch-compute/openstack/intel-worker/playbooks/roles:/home/runner/.cache/ansible-compat/ec883f/roles:/home/runner/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/home/runner/work/ocp4-upi-multiarch-compute/ocp4-upi-multiarch-compute/openstack/intel-worker/playbooks

- name: Intel worker flavor create
roles:
- flavor-create

- name: Intel worker vitrual_machine create
roles:
- vm-create

- name: Intel worker vitrual_machine create
roles:
- vm-server-action
vars:
virtual_machine_server_action: "stop"

- name: Intel worker vitrual_machine create
roles:
- vm-server-action
vars:
virtual_machine_server_action: "start"
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
- name: OpenStack worker node configuration Tasks (i.e. Create worker.ign, Upload RHCOS Image, Create Customization Script, Create Instance etc)

Check failure on line 2 in openstack/intel-worker/playbooks/roles/centosImage-create/tasks/main.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

syntax-check[specific]

conflicting action statements: hosts, vars_files
hosts: all
vars_files:
- ../../../../vars/main.yml

tasks:
- name: Download the Image from the URL and use to create image
ansible.builtin.get_url:
url: "{{ image_url_centos }}"
dest: "{{ image_dest_filename_centos }}"
mode: '0755'
validate_certs: "{{ image_validate_certs_centos }}"
register: image_download_stats

- name: Create/upload Centos images to openstack.
openstack.cloud.image:
cloud: openstack
state: present
name: "{{ image_name_centos_centos }}"
container_format: "{{ image_container_format_centos }}"
disk_format: "{{ image_disk_format_centos }}"
filename: "{{ image_dest_filename_centos }}"
is_public: "{{ image_is_public_centos }}"
properties:
cpu_arch: "{{ image_cpu_arch_centos }}"
distro: "{{ image_distro_centos }}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
- name: OpenStack worker node configuration Tasks (i.e. Create worker.ign, Upload RHCOS Image, Create Customization Script, Create Instance etc)

Check failure on line 2 in openstack/intel-worker/playbooks/roles/centosImage-delete/tasks/main.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

syntax-check[specific]

conflicting action statements: hosts, vars_files
hosts: all
vars_files:
- ../../../../vars/main.yml

tasks:
- name: Remove Centos images to openstack.
openstack.cloud.image:
cloud: openstack
state: absent
name: "{{ image_name_centos }}"
disk_format: "{{ image_disk_format_centos }}"
is_public: "{{ image_is_public_centos }}"
properties:
cpu_arch: "{{ image_cpu_arch_centos }}"
distro: "{{ image_distro_centos }}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
- name: OpenStack worker node configuration Tasks (i.e. Create worker.ign, Upload RHCOS Image, Create Customization Script, Create Instance etc)

Check failure on line 2 in openstack/intel-worker/playbooks/roles/flavor-create/tasks/main.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

syntax-check[specific]

conflicting action statements: hosts, vars_files
hosts: all
vars_files:
- ../../../../vars/main.yml

tasks:
- name: Create flavor to openstack
openstack.cloud.compute_flavor:
cloud: openstack
state: present
name: "{{ custom_flavor_name }}"
ram: "{{ custom_flavor_ram }}"
vcpus: "{{ custom_flavor_vcpus }}"
disk: "{{ custom_flavor_disk }}"
ephemeral: "{{ custom_flavor_ephemeral }}"
description: "{{ custom_flavor_description }}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
- name: OpenStack worker node configuration Tasks (i.e. Create worker.ign, Upload RHCOS Image, Create Customization Script, Create Instance etc)

Check failure on line 2 in openstack/intel-worker/playbooks/roles/flavor-delete/tasks/main.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

syntax-check[specific]

conflicting action statements: hosts, vars_files
hosts: all
vars_files:
- ../../../../vars/main.yml

tasks:
- name: Remove flavor from openstack
openstack.cloud.compute_flavor:
cloud: openstack
state: absent
name: "{{ custom_flavor_name }}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
- name: OpenStack worker node configuration Tasks (i.e. Create worker.ign, Upload RHCOS Image, Create Customization Script, Create Instance etc)

Check failure on line 2 in openstack/intel-worker/playbooks/roles/host-aggregate-create/tasks/main.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

syntax-check[specific]

conflicting action statements: hosts, vars_files
hosts: all
vars_files:
- ../../../../vars/main.yml

tasks:
- name: Create host aggregate (host group) to openstack
openstack.cloud.host_aggregate:
cloud: openstack
state: present
name: "{{ host_aggregate_name }}"
hosts: "{{ host_name_list }}"
metadata:
availability_zone: "{{ host_availability_zone_name }}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
- name: OpenStack worker node configuration Tasks (i.e. Create worker.ign, Upload RHCOS Image, Create Customization Script, Create Instance etc)

Check failure on line 2 in openstack/intel-worker/playbooks/roles/host-aggregate-delete/tasks/main.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

syntax-check[specific]

conflicting action statements: hosts, vars_files
hosts: all
vars_files:
- ../../../../vars/main.yml

tasks:
- name: Remove host aggregate (host group) from openstack
openstack.cloud.host_aggregate:
cloud: openstack
state: absent
name: "{{ host_aggregate_name }}"
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
- name: OpenStack worker node configuration Tasks (i.e. Create worker.ign, Upload RHCOS Image, Create Customization Script, Create Instance etc)

Check failure on line 2 in openstack/intel-worker/playbooks/roles/rhcosImage-create/tasks/main.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

syntax-check[specific]

conflicting action statements: hosts, vars_files
hosts: all
vars_files:
- ../../../../vars/main.yml

tasks:
- name: "Download the Image from the URL and use to create image"
ansible.builtin.get_url:
url: "{{ image_url_rhcos }}"
dest: "{{ image_dest_filename_rhcos }}"
mode: '0755'
validate_certs: "{{ image_validate_certs_rhcos }}"
register: image_download_stats

- name: Create/upload RHCOS images to openstack.
openstack.cloud.image:
cloud: openstack
state: present
name: "{{ image_name_rhcos }}"
container_format: "{{ image_container_format_rhcos }}"
disk_format: "{{ image_disk_format_rhcos }}"
filename: "{{ image_dest_filename_rhcos }}"
is_public: "{{ image_is_public_rhcos }}"
properties:
cpu_arch: "{{ image_cpu_arch_rhcos }}"
distro: "{{ image_distro_rhcos }}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
- name: OpenStack worker node configuration Tasks (i.e. Create worker.ign, Upload RHCOS Image, Create Customization Script, Create Instance etc)

Check failure on line 2 in openstack/intel-worker/playbooks/roles/rhcosImage-delete/tasks/main.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

syntax-check[specific]

conflicting action statements: hosts, vars_files
hosts: all
vars_files:
- ../../../../vars/main.yml

tasks:
- name: Remove RHCOS images from openstack.
openstack.cloud.image:
cloud: openstack
state: absent
name: "{{ image_name_rhcos }}"
disk_format: "{{ image_disk_format_rhcos }}"
is_public: "{{ image_is_public_rhcos }}"
properties:
cpu_arch: "{{ image_cpu_arch_rhcos }}"
distro: "{{ image_distro_rhcos }}"
23 changes: 23 additions & 0 deletions openstack/intel-worker/playbooks/roles/vm-create/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
# file: intel-worker-playbook.yml

- name: OpenStack worker node configuration Tasks (i.e. Create worker.ign, Upload RHCOS Image, Create Customization Script, Create Instance etc)

Check failure on line 4 in openstack/intel-worker/playbooks/roles/vm-create/tasks/main.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

syntax-check[specific]

conflicting action statements: hosts, vars_files
hosts: all
vars_files:
- ../../../../vars/main.yml

tasks:
- name: Create server in the Multi-Arch Compute OpenStack Instance
openstack.cloud.server:
cloud: openstack
state: present
name: "{{ virtual_machine_name }}"
region_name: "{{ virtual_machine_region_name }}"
availability_zone: "{{ vitrual_machine_availability_zone }}"
image: "{{ virtual_machine_image_name }}"
flavor: "{{ virtual_machine_flavor }}"
volume_size: "{{ virtual_machine_volume_size }}"
key_name: "{{ virtual_machine_keypair_name }}"
network: "{{ virtual_machine_network_name }}"
userdata: "{{ virtual_machine_userdata }}"
timeout: "{{ virtual_machine_timeout }}"
12 changes: 12 additions & 0 deletions openstack/intel-worker/playbooks/roles/vm-delete/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
- name: OpenStack worker node configuration Tasks (i.e. Create worker.ign, Upload RHCOS Image, Create Customization Script, Create Instance etc)
hosts: all
vars_files:
- ../../../../vars/main.yml

tasks:
- name: Delete server in the Multi-Arch Compute OpenStack Instance
openstack.cloud.server:
cloud: openstack
state: absent
name: "{{ virtual_machine_name }}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
- name: OpenStack worker node configuration Tasks (i.e. Create worker.ign, Upload RHCOS Image, Create Customization Script, Create Instance etc)
hosts: all
vars_files:
- ../../../../vars/main.yml

tasks:
- name: Virtual machine action like start/stop/restart etc in the Multi-Arch Compute OpenStack
openstack.cloud.server_action:
cloud: openstack
action: "{{ virtual_machine_server_action }}"
server: "{{ virtual_machine_name }}"
timeout: "{{ virtual_machine_action_timeout }}"
wait: "{{ virtual_machine_action_wait }}"
22 changes: 0 additions & 22 deletions openstack/intel-worker/tasks/create_centos_image.yml

This file was deleted.

11 changes: 0 additions & 11 deletions openstack/intel-worker/tasks/create_flavor.yml

This file was deleted.

9 changes: 0 additions & 9 deletions openstack/intel-worker/tasks/create_host_aggregate.yml

This file was deleted.

21 changes: 0 additions & 21 deletions openstack/intel-worker/tasks/create_rhcos_image.yml

This file was deleted.

15 changes: 0 additions & 15 deletions openstack/intel-worker/tasks/create_vm_instance.yml

This file was deleted.

6 changes: 0 additions & 6 deletions openstack/intel-worker/tasks/delete_vm_instance.yml

This file was deleted.

11 changes: 0 additions & 11 deletions openstack/intel-worker/tasks/remove_centos_image.yml

This file was deleted.

6 changes: 0 additions & 6 deletions openstack/intel-worker/tasks/remove_flavor.yml

This file was deleted.

6 changes: 0 additions & 6 deletions openstack/intel-worker/tasks/remove_host_aggregate.yml

This file was deleted.

11 changes: 0 additions & 11 deletions openstack/intel-worker/tasks/remove_rhcos_image.yml

This file was deleted.

8 changes: 0 additions & 8 deletions openstack/intel-worker/tasks/vm_server_action.yml

This file was deleted.

0 comments on commit 3a95436

Please sign in to comment.