Comments (2)
Hi @wazzfi !!
Refer to either this video or this Ansible article on How to Use Variables in Ansible. But for your supplied example, let's say we want to use the name of the device in Ansible's inventory, we could use the special variable inventory_hostname
OR if you have a variable defined in your inventory, let's say device_hostname
this would be the solution:
- name: backup configuration files using Ansible defined special variable inventory_hostname
arubaoss_config_bkup:
file_name: "{{ inventory_hostname }}"
server_type: ST_TFTP
server_ip: 192.168.1.2
- name: backup configuration files using user defined inventory variable device_hostname
arubaoss_config_bkup:
file_name: "{{ device_hostname }}"
server_type: ST_TFTP
server_ip: 192.168.1.2
In regards to 'How-To' questions, our Airheads developer community is the best place for that!!
from aruba-ansible-modules.
closing issue...
from aruba-ansible-modules.
Related Issues (20)
- [Errno 2] arubaoss_rest.py HOT 2
- "Connection failure: Remote end closed connection without response during login" HOT 9
- No output from **arubaoss_command:** when more tasks running in parallel HOT 8
- arubaoss_file_transfer upload firmware not working on all switch models HOT 2
- Can't install Aruba Ansible modules with Ansible 2.10+ HOT 4
- Modules not found even though they exist HOT 3
- allow installation of modules in 2.10.x HOT 3
- module doesn't upgrade all switches HOT 1
- Playbook Execution Failed During Ansible Testing with ArubaOS Switch HOT 2
- aruba_module_installer.py error /usr/lib/python3/dist-packages/ansible/plugins/doc_fragments does not exist on Debian Linux 10
- CONTRIBUTING.md "Aruba Bots Automate Videos" Playlist Link does not exist HOT 1
- Support for prompt in arubaoss_command HOT 1
- API call succeeds but is reported as failed HOT 5
- how to banner ansible HOT 2
- How to automate Cisco ios switch backup to tftp server using ansible HOT 1
- Error in "arubanetworks.aos_switch.arubaoss_vlan" documentation HOT 1
- arubaoss_facts error HOT 3
- Unable to backup to tftp HOT 1
- Stuck with : Request failed: <urlopen error [Errno -2] Name or service not known> HOT 12
- aruba-ansible module doesn't work HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aruba-ansible-modules.