VMware Aria Automation Tools

 View Only
Expand all | Collapse all

Passing Aria Automation 8.18 Project properties to Ansible integration stanza

  • 1.  Passing Aria Automation 8.18 Project properties to Ansible integration stanza

    Posted Feb 21, 2025 06:34 PM
    Edited by evil242 Feb 21, 2025 06:35 PM

    We are having issues getting a custom property established at the Project level to the Ansible integration Stanza

    For example we have where we are trying to convey a LDAP netgroup into the host via Ansible hostVariable

      Cloud_Ansible_1:
        type: Cloud.Ansible
        properties:
          host: ${resource.Cloud_vSphere_Machine_1.*}
          osType: linux
          account:Ansible-Dev
          playbooks:
            provision:
              - /opt/ansible/devl/master/playbooks/vra/vra_provision_host.yml
              - /opt/ansible/devl/playbooks/satellite/migrateToNewSatellite.yml
            de-provision:
              - /opt/ansible/devl/master/playbooks/vra/vra_deprovision_host.yml
          hostVariables:
            netgroup: ${LDAPnetgroup}
          privateKeyFile: /opt/ansible/.ssh/id_rsa

     

    At the deployment level we see the variable on the Cloud_vSphere_Machine_1 resource 

    But then on the Cloud_Ansible_1 I can't seem to get it to reference the LDAPnetgroup variable that was came from the Project > Provision > Custom Properties

    As you can see, in the deployment, the variable hostvariables {"netgroup":"${LDAPnetgroup}"} comes across.  Which then gets populated exactly as +@${LDAPnetgroup} instead of desired +@lc_abc_adm into the /etc/password

    What's the proper way to pass Project custom properties to the Cloud_Ansible integration?



  • 2.  RE: Passing Aria Automation 8.18 Project properties to Ansible integration stanza

    Broadcom Employee
    Posted Feb 28, 2025 12:59 PM
    Edited by Logan Skrzypczak Feb 28, 2025 12:59 PM

    Project level custom property variable substitution with Aria Automation expression syntax can achieve this by replacing netgroups value as you have it changed to:
    ${resource.Cloud_vSphere_Machine_1.LDAPnetgroup}