Thank you guys that helps! On Friday, April 24, 2020 at 4:06:08 AM UTC-4, Stefan Hornburg (Racke) wrote: > > On 4/24/20 10:01 AM, jean-christophe manciot wrote: > > Yes, of course: you can define the variable anywhere, including in the > hosts file. > > There are 2 differences though: > > > > * the precedence > > < > https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable>. > > > > * the way the variables are defined: the inventory file is not a yaml > file (ini format). Refer to this post > > < > https://stackoverflow.com/questions/29856738/how-to-define-hash-dict-in-ansible-inventory-file> > > for how to define > > your dictionary(ies) in the hosts file. > > > > The second statement is correct only if you refer to the host file > (defaults to /etc/ansible/host). The inventory for > your playbook can be written completely in YAML. > > Regards > Racke > > > -- > > You received this message because you are subscribed to the Google > Groups "Ansible Project" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to > > [email protected] <javascript:> <mailto: > [email protected] <javascript:>>. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/ansible-project/8a4beb04-ffdd-44fb-b3d8-f0149eff5a61%40googlegroups.com > > > < > https://groups.google.com/d/msgid/ansible-project/8a4beb04-ffdd-44fb-b3d8-f0149eff5a61%40googlegroups.com?utm_medium=email&utm_source=footer>. > > > > > -- > Ecommerce and Linux consulting + Perl and web application programming. > Debian and Sympa administration. Provisioning with Ansible. > >
-- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ef92ef42-47bb-4135-a5e9-d9e7b2f01f58%40googlegroups.com.
