Skip to content

Commit

Permalink
use only lowercase in variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
elsapassaro authored and shellymiron committed Apr 25, 2024
1 parent e12c079 commit 1295795
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 39 deletions.
6 changes: 3 additions & 3 deletions tests/e2e/molecule/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Additionally, create a password file for the vSphere credentials (vault password

```yaml
# vault.yml
vCenter_hostname: "your_vsphere_hostname"
vCenter_username: "your_vsphere_username"
vCenter_password: "your_vsphere_password"
vcenter_hostname: "your_vsphere_hostname"
vcenter_username: "your_vsphere_username"
vcenter_password: "your_vsphere_password"

Those should be encrypted using ansible-vault command and be placed under `vault_files/eco_vsphere_creds.yml`
The saved password should be placed under `${HOME}/vault.pass`
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/molecule/manage_vm/destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

- name: Ensure secondary network created in tests is absent
community.vmware.vmware_portgroup:
hostname: "{{ vCenter_hostname }}"
username: "{{ vCenter_username }}"
password: "{{ vCenter_password }}"
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: "{{ provision_vm_validate_certs }}"
cluster_name: "{{ provision_vm_cluster }}"
switch: "{{ vswitch_name }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
- name: Check that "{{ item.provision_vm_name }}" VM does not exist
community.vmware.vmware_vm_info:
hostname: "{{ vCenter_hostname }}"
username: "{{ vCenter_username }}"
password: "{{ vCenter_password }}"
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: "{{ provision_vm_validate_certs }}"
vm_name: "{{ item.provision_vm_name }}"
register: vm_info
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
- name: Collect information about VM with ID {{ vm_moid }}
vmware.vmware_rest.vcenter_vm_info:
vcenter_hostname: "{{ vCenter_hostname }}"
vcenter_username: "{{ vCenter_username }}"
vcenter_password: "{{ vCenter_password }}"
vcenter_hostname: "{{ vcenter_hostname }}"
vcenter_username: "{{ vcenter_username }}"
vcenter_password: "{{ vcenter_password }}"
vcenter_validate_certs: "{{ provision_vm_validate_certs }}"
vm: '{{ vm_moid }}'
register: vm_info_updated_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

- name: Get network info about {{ vm_update_name }} VM
community.vmware.vmware_guest_network:
hostname: "{{ vCenter_hostname }}"
username: "{{ vCenter_username }}"
password: "{{ vCenter_password }}"
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: "{{ provision_vm_validate_certs }}"
uuid: "{{ vm_uuid }}"
gather_network_info: true
Expand All @@ -32,27 +32,27 @@

- name: Retrieve the CPU information from the VM
vmware.vmware_rest.vcenter_vm_hardware_cpu_info:
vcenter_hostname: "{{ vCenter_hostname }}"
vcenter_username: "{{ vCenter_username }}"
vcenter_password: "{{ vCenter_password }}"
vcenter_hostname: "{{ vcenter_hostname }}"
vcenter_username: "{{ vcenter_username }}"
vcenter_password: "{{ vcenter_password }}"
vcenter_validate_certs: "{{ provision_vm_validate_certs }}"
vm: "{{ vm_moid }}"
register: cpu_info

- name: Retrieve the memory information from the VM
vmware.vmware_rest.vcenter_vm_hardware_memory_info:
vcenter_hostname: "{{ vCenter_hostname }}"
vcenter_username: "{{ vCenter_username }}"
vcenter_password: "{{ vCenter_password }}"
vcenter_hostname: "{{ vcenter_hostname }}"
vcenter_username: "{{ vcenter_username }}"
vcenter_password: "{{ vcenter_password }}"
vcenter_validate_certs: "{{ provision_vm_validate_certs }}"
vm: "{{ vm_moid }}"
register: memory_info

- name: Retrieve disk information using the disk label
vmware.vmware_rest.vcenter_vm_hardware_disk_info:
vcenter_hostname: "{{ vCenter_hostname }}"
vcenter_username: "{{ vCenter_username }}"
vcenter_password: "{{ vCenter_password }}"
vcenter_hostname: "{{ vcenter_hostname }}"
vcenter_username: "{{ vcenter_username }}"
vcenter_password: "{{ vcenter_password }}"
vcenter_validate_certs: "{{ provision_vm_validate_certs }}"
vm: "{{ vm_moid }}"
label: Hard disk 1
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/molecule/manage_vm/scenarios/update_vm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@

- name: Add Management Network VM Portgroup to all hosts in a cluster
community.vmware.vmware_portgroup:
hostname: "{{ vCenter_hostname }}"
username: "{{ vCenter_username }}"
password: "{{ vCenter_password }}"
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: "{{ provision_vm_validate_certs }}"
cluster_name: "{{ provision_vm_cluster }}"
switch: "{{ vswitch_name }}"
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/molecule/manage_vm/tasks/get_vm_info.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
- name: Check {{ vm_name }} VM existence
community.vmware.vmware_vm_info:
hostname: "{{ vCenter_hostname }}"
username: "{{ vCenter_username }}"
password: "{{ vCenter_password }}"
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: "{{ provision_vm_validate_certs }}"
vm_name: "{{ vm_name }}"
register: vm_info
Expand Down
12 changes: 6 additions & 6 deletions tests/e2e/molecule/manage_vm/tasks/install_vmware_tools.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
- name: Install VMware Tools on VM with ID {{ vm_moid }}
vmware.vmware_rest.vcenter_vm_tools_installer:
vcenter_hostname: "{{ vCenter_hostname }}"
vcenter_username: "{{ vCenter_username }}"
vcenter_password: "{{ vCenter_password }}"
vcenter_hostname: "{{ vcenter_hostname }}"
vcenter_username: "{{ vcenter_username }}"
vcenter_password: "{{ vcenter_password }}"
vcenter_validate_certs: "{{ provision_vm_validate_certs }}"
vm: "{{ vm_moid }}"
state: connect
Expand All @@ -14,9 +14,9 @@

- name: Wait for VMware tools to become available
community.vmware.vmware_guest_tools_wait:
hostname: "{{ vCenter_hostname }}"
username: "{{ vCenter_username }}"
password: "{{ vCenter_password }}"
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: "{{ provision_vm_validate_certs }}"
moid: "{{ vm_moid }}"
register: wait_result
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/molecule/manage_vm/vars/vars.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vars.yaml
provision_vm_hostname: "{{ vCenter_hostname }}"
provision_vm_username: "{{ vCenter_username }}"
provision_vm_password: "{{ vCenter_password }}"
provision_vm_hostname: "{{ vcenter_hostname }}"
provision_vm_username: "{{ vcenter_username }}"
provision_vm_password: "{{ vcenter_password }}"
provision_vm_validate_certs: false

provision_vm_cluster: "Eco-Cluster"
Expand Down

0 comments on commit 1295795

Please sign in to comment.