Developer

 View Only
last person joined: 2 hours ago 

Expand all | Collapse all

Ansible and Aruba

This thread has been viewed 39 times
  • 1.  Ansible and Aruba

    Posted Jul 07, 2023 10:12 AM

    Everyone -

    I'm having issues apply a template to a device. Just trying a simple hostname change: Here's the ansible playbook snippet I'm running:

    - name: Create/set template variables for all/multiple devices using a JSON file # NOQA
     central_variables:
     action: create_all
     local_file_path: variables.json 
    No matter what I do, it say it cannot locate the variables file.


  • 2.  RE: Ansible and Aruba

    EMPLOYEE
    Posted Jul 07, 2023 11:55 AM

    Hello, let me check with the team and we'll get back to you.  Just for clarification, is this using the Aruba Central Roles for Ansible, or the Aruba Central Ansible Collection?




  • 3.  RE: Ansible and Aruba

    Posted Jul 07, 2023 01:44 PM

    @mk53202 !

    Are you using Ansible CLI to execute or are you using a GUI? Since the GUI creates a venv during runtime the variable path might be different. Also can you provide the error you receive?



    ------------------------------
    Ti Chiapuzio-Wong (they/them)
    HPE Aruba Networking
    ------------------------------



  • 4.  RE: Ansible and Aruba

    Posted Jul 10, 2023 04:21 PM

    I'm using the CLI. Just regular ansible-playbook CLI. Only error I'm getting is path cannot be found, even though I've tried all the combination of path with ./ / and even fully qualified in single quotes. Does someone have an example of changed the hostname of a device in central that is already provisioned. Just not finding a lot of documentation at all.




  • 5.  RE: Ansible and Aruba

    Posted Jul 10, 2023 05:00 PM

    Where are you writing/executing your file? Is it in a path owned by the user? I would recommend creating a folder on your Desktop and re-try the playbook/variable file in that location and see if you get the same error?



    ------------------------------
    Ti Chiapuzio-Wong (they/them)
    HPE Aruba Networking
    ------------------------------



  • 6.  RE: Ansible and Aruba

    Posted Jul 17, 2023 12:57 PM

    Yes, that's what we are doing. Dedicated folder, playbook is in the same directory as the variables.json. Tried variables.json ./variables.json 'variables.json' and './variables.json' No success. Any other ideas? Does anyone have an example of applying a host rename off variables file that they can share or provide any guidance in doing so?