help - I'am not having much luck with the modules,
progress so far the module
arubaos_cx_ssh_cli:
is from https://github.com/aruba/aruba-switch-ansible which I have cloned and copied the library and task list to the Project Folder.
The templates are being created and put in the config folder, so my
My playbook currently looks like this
---
- name: Build Core Switch Config and Upload to device
gather_facts: no
hosts: localhost
roles:
- CoreSwitch
tasks:
- name: Upload Configuration
arubaos_cx_ssh_cli:
ip: "{{ip | default(ansible_host)}}"
user: "{{user | default(ansible_user)}}"
password: "{{password | default(ansible_password)}}"
commands: ["copy tftp://{{tftp_server}}/{{temp_config_file}} running-config vrf mgmt"]
but the response
[root@localhost ProjectA]# ansible-playbook CoreSwitchBuild.yml
ERROR! Syntax Error while loading YAML.
mapping values are not allowed in this context
The error appears to be in '/root/ProjectA/CoreSwitchBuild.yml': line 11, column 25, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: Upload Configuration
arubaos_cx_ssh_cli:
^ here
Am I using the module correctly?
I also have considerations towards the mode operation of ansible with the Aruba CX and Switch. I was originally aiming for more of an ad-hoc configuration scripting, while it seems the modules suit a more holistic environment, where configs are built and upload on change, or is the ssh_cli module suitable for sending adhoc commands?