Skip to content

Commit

Permalink
added run_on_simulator var
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-savina committed Jul 9, 2024
1 parent 38557cd commit 67cc085
Show file tree
Hide file tree
Showing 27 changed files with 59 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: Run cluster settings role on the vCenter Env
tags: eco-vcenter-ci
when: not run_on_simulator
block:
- name: Import common vars
ansible.builtin.include_vars:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
run_on_simulator: true

cluster_settings_hostname: "127.0.0.1"
cluster_settings_username: "test"
cluster_settings_password: "test"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
run_on_simulator: false

cluster_settings_hostname: "{{ vcenter_hostname }}"
cluster_settings_username: "{{ vcenter_username }}"
cluster_settings_password: "{{ vcenter_password }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
- name: Test
tags:
- eco-vcenter-ci
when: not run_on_simulator
block:
- name: Import common vars
ansible.builtin.include_vars:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
run_on_simulator: false

content_library_hostname: "{{ vcenter_hostname }}"
content_library_username: "{{ vcenter_username }}"
content_library_password: "{{ vcenter_password }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
- name: Setup
tags:
- eco-vcenter-ci
when: not run_on_simulator
block:
- name: Import common vars
ansible.builtin.include_vars:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
run_on_simulator: false
vmware_deploy_ovf_test_export_dir: /tmp

deploy_ovf_hostname: "{{ vcenter_hostname }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: Test esxi maintenance on simulator
tags: integration-ci
when: run_on_simulator
block:
- name: Enable Maintenance Mode
ansible.builtin.include_role:
Expand All @@ -15,7 +15,7 @@
esxi_maintenance_mode_enable: False

- name: Test esxi maintenance mode on vcenter env
tags: eco-vcenter-ci
when: not run_on_simulator
block:
- name: Import common vars
ansible.builtin.include_vars:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
run_on_simulator: true

esxi_maintenance_mode_hostname: "127.0.0.1"
esxi_maintenance_mode_username: "test"
esxi_maintenance_mode_password: "test"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
# General vars
run_on_simulator: false
resource_prefix: host-maintenance
resource_pool_name: "{{ resource_prefix }}-pool"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
- name: Test
tags:
- eco-vcenter-ci
when: not run_on_simulator
block:
- name: Import common vars
ansible.builtin.include_vars:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
run_on_simulator: false

export_vm_as_ovf_hostname: "{{ vcenter_hostname }}"
export_vm_as_ovf_username: "{{ vcenter_username }}"
export_vm_as_ovf_password: "{{ vcenter_password }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: Import common vars for tests on vCenter Environment
ansible.builtin.include_vars:
file: ../group_vars.yml
tags: eco-vcenter-ci
when: not run_on_simulator

- name: Create Folder Tree
loop: "{{ folder_types }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
run_on_simulator: true

manage_folder_hostname: "127.0.0.1"
manage_folder_username: "test"
manage_folder_password: "test"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
run_on_simulator: false

manage_folder_hostname: "{{ vcenter_hostname }}"
manage_folder_username: "{{ vcenter_username }}"
manage_folder_password: "{{ vcenter_password }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
- name: Test Virtual Esxi Provisioning on Simulator
tags: integration-ci
when: run_on_simulator
ansible.builtin.include_role:
name: cloud.vmware_ops.provision_virtual_esxi

- name: Test Virtual Esxi Provisioning on vCenter Env
tags: eco-vcenter-ci
when: not run_on_simulator
block:
- name: Import common vars
ansible.builtin.include_vars:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
run_on_simulator: true

provision_virtual_esxi_hostname: "127.0.0.1"
provision_virtual_esxi_username: "test"
provision_virtual_esxi_password: "test"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
run_on_simulator: false

provision_virtual_esxi_hostname: "{{ vcenter_hostname }}"
provision_virtual_esxi_username: "{{ vcenter_username }}"
provision_virtual_esxi_password: "{{ vcenter_password }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
- name: Provision VM for simulator
ansible.builtin.import_role:
name: cloud.vmware_ops.provision_vm
tags: integration-ci
when: run_on_simulator

- name: Perform VM Lifecycle Operations in vCenter Environment
when: not run_on_simulator
block:
- name: Import common vars
ansible.builtin.include_vars:
Expand Down Expand Up @@ -48,4 +49,3 @@
switch: "{{ vswitch_name }}"
portgroup: "{{ portgroup_name }}"
state: absent
tags: eco-vcenter-ci
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
run_on_simulator: true

provision_vm_hostname: "127.0.0.1"
provision_vm_username: "test"
provision_vm_password: "test"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# vars.yaml
run_on_simulator: false

provision_vm_hostname: "{{ vcenter_hostname }}"
provision_vm_username: "{{ vcenter_username }}"
provision_vm_password: "{{ vcenter_password }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
ignore_errors: true
ansible.builtin.import_role:
name: cloud.vmware_ops.snapshot_management
tags: integration-ci
when: run_on_simulator

- name: Test VM snapshot management role in vCenter Environment
when: not run_on_simulator
block:
- name: Import common vars
ansible.builtin.include_vars:
Expand Down Expand Up @@ -49,4 +50,3 @@
vars:
provision_vm_state: absent
provision_vm_force: true
tags: eco-vcenter-ci
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
snapshot_management_hostname: "127.0.0.1"
snapshot_management_username: "test"
snapshot_management_password: "test"
snapshot_management_validate_certs: false
snapshot_management_folder: "/DC0/vm"
snapshot_management_datacenter: "DC0"
snapshot_management_vm_name: "DC0_H0_VM0"
snapshot_management_port: "8989"
snapshot_management_state: present
snapshot_management_snapshot_name: "snap1"
snapshot_management_snapshot_description: "snap1_description"
---
run_on_simulator: true

snapshot_management_hostname: "127.0.0.1"
snapshot_management_username: "test"
snapshot_management_password: "test"
snapshot_management_validate_certs: false
snapshot_management_folder: "/DC0/vm"
snapshot_management_datacenter: "DC0"
snapshot_management_vm_name: "DC0_H0_VM0"
snapshot_management_port: "8989"
snapshot_management_state: present
snapshot_management_snapshot_name: "snap1"
snapshot_management_snapshot_description: "snap1_description"
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# vars.yaml
run_on_simulator: false

snapshot_management_hostname: "{{ vcenter_hostname }}"
snapshot_management_username: "{{ vcenter_username }}"
snapshot_management_password: "{{ vcenter_password }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: Test vCenter host connection role on vCenter env
tags: eco-vcenter-ci
when: not run_on_simulator
block:
- name: Import common vars
ansible.builtin.include_vars:
Expand Down Expand Up @@ -89,7 +89,7 @@
required_state: absent

- name: Test vCenter host connection role on simulator
tags: integration-ci
when: run_on_simulator
block:
- name: Add ESXI Host to vCenter Cluster
ansible.builtin.import_role:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
run_on_simulator: true

vcenter_host_connection_hostname: "127.0.0.1"
vcenter_host_connection_username: "test"
vcenter_host_connection_password: "test"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
# General
run_on_simulator: false
resource_pool_name: "host-connection-test-pool"

# Vars for cloud.vmware_ops.provision_virtual_esxi role
Expand Down

0 comments on commit 67cc085

Please sign in to comment.