saltstack / salt-ext-modules-vmware

Salt Extension Modules for VMware
Apache License 2.0
20 stars 36 forks source link

vcenter profile could not be found in the Pillar #351

Closed ivanstcoe closed 1 year ago

ivanstcoe commented 1 year ago

I have defined the following config in the Pillars

   "saltext.vmware": {
        "vcenter": {
            "host": "xxx",
            "password": "xxx",
            "user": "xxx"
        }
    }

When i run the following state file i receive an error

get_esxi_advanced_config_info:
  module.run:
    - name: vmware_esxi.get_advanced_config

Error message:


local:
----------
          ID: get_esxi_firewall_config_info
    Function: module.run
        Name: vmware_esxi.get_all_firewall_configs
      Result: False
     Comment: Module function vmware_esxi.get_all_firewall_configs threw an exception. Exception: Cannot create service instance, VMware credentials incomplete.
     Started: 18:30:31.786613
    Duration: 41.309 ms
     Changes:
ivanstcoe commented 1 year ago

@zruzhinov @joechainz @waynew as discussed yesterday

waynew commented 1 year ago

What is the output of salt-call --local pillar.items?

ivanstcoe commented 1 year ago

(vmw-ext) [root@rhel8-minion-1 states]# salt-call pillar.items

local:

saltext.vmware:
    ----------
    vcenter:
        ----------
        host:
            xxx.corp.local
        password:
            xxx!
        user:
            xxx@vsphere.local
vmware_config:
    ----------
    host:
        xxx.corp.local
    password:
        xxx!
    user:
        xxx@vsphere.local
ivanstcoe commented 1 year ago

module was successfully executed providing the vcenter profile as parameter

salt-call vmware_vm.list profile=vcenter

waynew commented 1 year ago

I'm going to close this out and create a new issue to track improving the profile behavior