Hello Ansible users,
i have a nice playbook that make a convenient hash table for network card
like that:
{
"192.168.0.1": "eth0",
"192.168.0.2": "eth1"
}
Here is the playbook:
- set_fact:
ifaces: "{{ ifaces|default({}) | combine({hostvars[item]['ansible_%s' |
l_iface)]['ipv4']['address']: local_iface}) }}"
with_items:
- "{{ hostvars[item]['ansible_interfaces'] }}"
loop_control:
loop_var: local_iface
But with no more luck.
Any ideas?
Le mercredi 14 mars 2018 18:44:57 UTC+1, Lienj a écrit :
>
> Hello Ansible users,
> i have
tvars[item]['ansible_'~local_iface]['ipv4'] is defined
with_items:
- "{{ hostvars[item]['ansible_interfaces'] }}"
loop_control:
loop_var: local_iface
Le dimanche 18 mars 2018 07:47:57 UTC+1, Kai Stian Olstad a écrit :
>
> On Friday, 16 March 2018 13.11.08 CET Lienj w
Hi there,
we have a bunch of playbooks and roles, all written in Ansible version >=
2.4
I need to audit all our playbooks in order to migrate to a more recent
version.
There are a lot of changes from 2.4 to 2.5 mainly:
- Loops (with_item vs loop)
- Attributes inheritances
I don't know
Thanks all, you were right this was not a big amount of work.
Le lundi 31 décembre 2018 16:52:32 UTC+1, Lienj a écrit :
>
> Hi there,
> we have a bunch of playbooks and roles, all written in Ansible version >=
> 2.4
> I need to audit all our playbooks in order to migrat
Hello,
in my company we used MS systemcenter Orchestrator as an orchestrator (most
of the servers are Windows based).
As we have more and more Linux servers, i used Ansible to deploy
configuration, etc ...
Question is: anybody here manage to use Orchestrator's runbooks for
launching Ansible's
Hello,
i think using AD as a dynamic inventory is a good option.
Sometimes CMDB is not up to date and has a few or no API to use to retrieve
a list of hosts.
If you strictly join all your hosts to your AD then it can be a weapon of
choice for a dynamic inventory.
If retrieving hosts from AD with