Skip to content

Commit

Permalink
Merge pull request #18 from pkenchap/varfiles
Browse files Browse the repository at this point in the history
OCTOPUS-625:modified files and names and var files as per ansible-lint
  • Loading branch information
prb112 authored Mar 14, 2024
2 parents 29007d3 + e502d16 commit 5fa143d
Show file tree
Hide file tree
Showing 41 changed files with 208 additions and 226 deletions.
23 changes: 11 additions & 12 deletions openstack/intel-worker/playbooks/intel-worker-cleanup-playbook.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
---
- name: OpenStack worker node configuration Tasks
- name: Intel worker vitrual_machine delete
hosts: all
tasks:
- name: Intel worker vitrual_machine delete
roles:
- vm-delete
roles:
- virtual_machine_delete

- name: Intel worker flavor create
roles:
- flavor-delete
- name: Intel worker flavor create
hosts: all
roles:
- custom_flavor_delete

- name: Create RHCHOS image
hosts: all
roles:
- rhcosImage-delete
- name: Create RHCHOS image
hosts: all
roles:
- rhcos_delete_image
44 changes: 23 additions & 21 deletions openstack/intel-worker/playbooks/intel-worker-playbook.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
---
- name: OpenStack worker node configuration Tasks
- name: Create RHCHOS image
hosts: all
tasks:
- name: Create RHCHOS image
roles:
- rhcosImage-create
roles:
- rhcos_create_image

- name: Intel worker flavor create
roles:
- flavor-create
- name: Intel worker flavor create
hosts: all
roles:
- custom_flavor_create

- name: Intel worker vitrual_machine create
roles:
- vm-create
- name: Intel worker vitrual_machine create
hosts: all
roles:
- virtual_machine_create

- name: Intel worker vitrual_machine create
roles:
- vm-server-action
vars:
virtual_machine_server_action: stop
- name: Intel worker vitrual_machine create
hosts: all
roles:
- virtual_machine_action
vars:
virtual_machine_action_name: stop

- name: Intel worker vitrual_machine create
roles:
- vm-server-action
vars:
virtual_machine_server_action: start
- name: Intel worker vitrual_machine create
hosts: all
roles:
- virtual_machine_action
vars:
virtual_machine_action_name: start

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---

# Image details centos
centos_create_image_name: Centos9_img
centos_create_image_container_format: bare
centos_create_image_disk_format: qcow2
centos_create_image_dest_filename: /tmp/CentOS-Stream-GenericCloud-9-20230327.0.x86_64.qcow2
centos_create_image_is_public: true
centos_create_image_url: https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-9-20230327.0.x86_64.qcow2
centos_create_image_cpu_arch: x86_64
centos_create_image_distro: rhel
centos_create_image_validate_certs: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
- name: Download the Image from the URL and use to create image
ansible.builtin.get_url:
url: "{{ centos_create_image_url }}"
dest: "{{ centos_create_image_dest_filename }}"
mode: "0755"
validate_certs: "{{ centos_create_image_validate_certs }}"
register: image_download_stats

- name: Create/upload Centos images to openstack.
openstack.cloud.image:
cloud: openstack
state: present
name: "{{ centos_create_image_name }}"
container_format: "{{ centos_create_image_container_format }}"
disk_format: "{{ centos_create_image_disk_format }}"
filename: "{{ centos_create_image_dest_filename }}"
is_public: "{{ centos_create_image_is_public }}"
properties:
cpu_arch: "{{ centos_create_image_cpu_arch }}"
distro: "{{ centos_create_image_distro }}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---

# Image details centos
centos_delete_image_name: Centos9_img
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
- name: Remove Centos images to openstack.
openstack.cloud.image:
cloud: openstack
state: absent
name: "{{ centos_delete_image_name }}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# Custom flavor details
custom_flavor_create_name: rdr_mac_8vcpu_16ram
custom_flavor_create_ram: 16
custom_flavor_create_vcpus: 8
custom_flavor_create_disk: 80
custom_flavor_create_ephemeral: 80
custom_flavor_create_description: custom flavour for mac intel worker 8 vcpu and 16gb ram
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
- name: Create flavor to openstack
openstack.cloud.compute_flavor:
cloud: openstack
state: present
name: "{{ custom_flavor_create_name }}"
ram: "{{ custom_flavor_create_ram }}"
vcpus: "{{ custom_flavor_create_vcpus }}"
disk: "{{ custom_flavor_create_disk }}"
ephemeral: "{{ custom_flavor_create_ephemeral }}"
description: "{{ custom_flavor_create_description }}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
# Custom flavor details
custom_flavor_delete_name: rdr_mac_8vcpu_16ram
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
openstack.cloud.compute_flavor:
cloud: openstack
state: absent
name: "{{ custom_flavor_name }}"
name: "{{ custom_flavor_delete_name }}"

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# Host aggregate details
host_aggregate_create_name: multi-arch-compute-aggregate
host_aggregate_create_availability_zone_name: multi-arch-aggregate
host_aggregate_create_name_list: [<host1>, <host2>, <host3>]
# Examples:
# host_name_list: ["xcloud8", "xcloud7", "xcloud10"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
- name: Create host aggregate (host group) to openstack
openstack.cloud.host_aggregate:
cloud: openstack
state: present
name: "{{ host_aggregate_create_name }}"
hosts: "{{ host_aggregate_create_name_list }}"
metadata:
availability_zone: "{{ host_aggregate_create_availability_zone_name }}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
# Host aggregate details
host_aggregate_delete_name: multi-arch-compute-aggregate
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
openstack.cloud.host_aggregate:
cloud: openstack
state: absent
name: "{{ host_aggregate_name }}"
name: "{{ host_aggregate_delete_name }}"

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# Image details Rhcos
rhcos_create_image_name: RHCOS_img
rhcos_create_image_container_format: bare
rhcos_create_image_disk_format: qcow2
rhcos_create_image_dest_filename: /tmp/rhcos-openstack.x86_64.qcow2.gz
rhcos_create_image_is_public: true
rhcos_create_image_url: https://mirror.openshift.com/pub/openshift-v4/x86_64/dependencies/rhcos/latest/rhcos-openstack.x86_64.qcow2.gz
rhcos_create_image_cpu_arch: x86_64
rhcos_create_image_distro: rhel
rhcos_create_image_validate_certs: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
- name: Download the Image from the URL and use to create image
ansible.builtin.get_url:
url: "{{ rhcos_create_image_url }}"
dest: "{{ rhcos_create_image_dest_filename }}"
mode: "0755"
validate_certs: "{{ rhcos_create_image_validate_certs }}"
register: image_download_stats

- name: Create/upload RHCOS images to openstack.
openstack.cloud.image:
cloud: openstack
state: present
name: "{{ rhcos_create_image_name_rhcos }}"
container_format: "{{ rhcos_create_image_container_format }}"
disk_format: "{{ rhcos_create_image_disk_format }}"
filename: "{{ rhcos_create_image_dest_filename }}"
is_public: "{{ rhcos_create_image_is_public }}"
properties:
cpu_arch: "{{ rhcos_create_image_cpu_arch }}"
distro: "{{ rhcos_create_image_distro }}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
# Image details Rhcos
rhcos_delete_image_name: RHCOS_img
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
- name: Remove RHCOS images from openstack.
openstack.cloud.image:
cloud: openstack
state: absent
name: "{{ rhcos_create_image_name }}"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# Virtual machine action
virtual_machine_server_action: start
virtual_machine_action_name: start
# server action list
# "lock"
# "pause"
Expand Down
Loading

0 comments on commit 5fa143d

Please sign in to comment.