Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Commit

Permalink
[#26] Problem with vcenter_gather_moid when vcenter uses self signed …
Browse files Browse the repository at this point in the history
…cert

- Added validate_certs: False to the example playbooks
  • Loading branch information
yfauser committed Aug 26, 2016
1 parent c8435d3 commit 0e96e3c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
5 changes: 5 additions & 0 deletions roles/base-config-nsx/tasks/main.yml
Expand Up @@ -30,6 +30,7 @@
password: "{{ vcPassword }}"
datacenter_name: "{{ targetDatacenterName }}"
cluster_name: "{{ targetClusters.cluster1.clusterName }}"
validate_certs: False
register: vcenter_mgmt_cluster_moid
tags: vsphere_facts

Expand All @@ -41,6 +42,7 @@
password: "{{ vcPassword }}"
datacenter_name: "{{ targetDatacenterName }}"
datastore_name: "{{ nsxControllerDatastore }}"
validate_certs: False
register: vcenter_mgmt_datastore_moid
tags: vsphere_facts

Expand All @@ -52,6 +54,7 @@
password: "{{ vcPassword }}"
datacenter_name: "{{ targetDatacenterName }}"
portgroup_name: "{{ nsxControllerPortGroup }}"
validate_certs: False
register: vcenter_mgmt_portgroup_moid
tags: vsphere_facts

Expand Down Expand Up @@ -92,6 +95,7 @@
password: "{{ vcPassword }}"
datacenter_name: "{{ targetDatacenterName }}"
cluster_name: "{{ targetClusters.cluster1.clusterName }}"
validate_certs: False
register: vcenter_compute_cluster_moid
tags: vsphere_facts

Expand Down Expand Up @@ -121,6 +125,7 @@
password: "{{ vcPassword }}"
datacenter_name: "{{ targetDatacenterName }}"
dvs_name: "{{ targetVdsName }}"
validate_certs: False
register: vcenter_dvs_moid
tags: vsphere_facts

Expand Down
4 changes: 4 additions & 0 deletions test_topology.yml
Expand Up @@ -24,6 +24,7 @@
password: "{{ vcenter_pwd }}"
datacenter_name: "{{ vcenter_dc }}"
datastore_name: "{{ vcenter_datastore }}"
validate_certs: False
register: gather_moids_ds
tags: moids
- name: gather moid for cl
Expand All @@ -33,6 +34,7 @@
password: "{{ vcenter_pwd }}"
datacenter_name: "{{ vcenter_dc }}"
cluster_name: "{{ vcenter_edge_cluster }}"
validate_certs: False
register: gather_moids_cl
tags: moids
- name: gather moid for uplink vnic
Expand All @@ -42,6 +44,7 @@
password: "{{ vcenter_pwd }}"
datacenter_name: "{{ vcenter_dc }}"
portgroup_name: 'vlan41'
validate_certs: False
register: gather_moids_upl_pg
tags: moids
- name: gather moid for mgmt portgroup
Expand All @@ -51,6 +54,7 @@
password: "{{ vcenter_pwd }}"
datacenter_name: "{{ vcenter_dc }}"
portgroup_name: 'vlan45'
validate_certs: False
register: gather_moids_pg
tags: moids

Expand Down
13 changes: 7 additions & 6 deletions test_vcenter_gather_moids.yml
Expand Up @@ -3,19 +3,20 @@
connection: local
gather_facts: False
vars_files:
- answerfile_new_nsxman.yml
- answerfile_TPM_Lab.yml
tasks:
- name: Gather vCenter MOIDs
vcenter_gather_moids:
hostname: 'testvc.emea.nicira'
username: 'administrator@vsphere.local'
password: 'vmware'
datacenter_name: 'nsxlabdc'
cluster_name: 'compute'
hostname: 'vc01.yves.local'
username: 'administrator@yves.local'
password: 'VMware1!'
datacenter_name: 'tpm-lab'
cluster_name: 'management'
#resourcepool_name: 'test_rp'
#dvs_name: 'TransportVDS'
#portgroup_name: 'VM Network'
#datastore_name: 'NFS-Storage03'
validate_certs: False
register: gather_moids_output

- debug: msg="The searched moid is {{ gather_moids_output.object_id }}"

0 comments on commit 0e96e3c

Please sign in to comment.