Kai Stian Olstad
unread,Nov 12, 2017, 9:42:58 AM11/12/17Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
On lørdag 11. november 2017 18.40.01 CET Federico Olivieri wrote:
> Hi all,
> I moved host variables from inventory to group_vars/all:
>
> In one example I have seen that, once moved the variable, it is possible to
> remove vars: from playbook (like the playbook automagically discover the
> group_vars/all. If I do that is not going to works. Still I need for vars:
> into playbook. Please see below
> vars:
> # cisco_asa:
> # host: "{{ ansible_host }}"
> # username: "{{ username }}"
> # password: "{{ password }}"
> # authorize: "yes"
> # auth_pass: "{{ auth_pass }}"
> # transport: cli
> # timeout: 60
> snmp_host: [10.42.9.61, 10.42.9.62]
>
> tasks:
> - name: add new TSDP IPs
> asa_config:
> lines:
> - snmp-server host transit {{ item }} community 0 SaNu9eSu
> # provider: "{{ cisco_asa }}"
You still need to provide the provider, how else is the module going to know where to connect?
The difference is only where you specify cisco_asa, the task asa_config should be equal in both cases.
--
Kai Stian Olstad