Thanks Racke, It is solved now.😊 Regards, Souvik
On Wed, 17 Jun 2020, 21:02 Stefan Hornburg (Racke), <[email protected]> wrote: > On 6/17/20 5:07 PM, ditun dhar wrote: > > Guys, > > > > I am new in Ansible and need some help. I am in need of segregating my > inventory file (which will change continuously > > based on another script output) with credential file. However Ansible > username, password and admin password will be same > > or static. I want to create a group variable file to store credential > and that should be encrypted using vault. > > > > Can you give some direction to hook my group variable file to inventory > file in Ansible playbook > > You can have separate files for your "main" inventory and group variables. > > Let's say your inventory is "production", you can set it up like that: > > production/production.yml => "main" inventory > production/group_vars/mygroup.yml => contains group variables > > You can encrypt your group variable file with: > > ansible-vault encrypt production/group_vars/mygroup.yml > > Given that your "main" inventory changes dynamically, check out these > resources: > > > https://docs.ansible.com/ansible/latest/user_guide/intro_dynamic_inventory.html > https://docs.ansible.com/ansible/latest/dev_guide/developing_inventory.html > > Regards > Racke > > > > > Regards, > > > > -- > > 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] <mailto: > [email protected]>. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/ansible-project/afd8dd60-269a-4f84-af2a-e979d5b051eao%40googlegroups.com > > < > https://groups.google.com/d/msgid/ansible-project/afd8dd60-269a-4f84-af2a-e979d5b051eao%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/2357b241-52db-c02b-d8bc-fdcbd3b47d13%40linuxia.de > . > -- 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/CAM4csBgJX3%2BscdykxFxas4Nmfs8TGJ%3DXyFaz3LHsJUY26Uw6Uw%40mail.gmail.com.
