lookup_plug in file too distributed

0 votes

My lookup plugin is very complex and distributed to be set in a single .py file. What do I do?

Jan 28, 2019 in Ansible by Laksha
61 views

1 answer to this question.

0 votes

Hey @laksha, you can wrap it into a package and add a small helper file, users will only have to do the following:

  1. pip install my_super_lookup
  2. Create ~/.ansible/plugins/lookup/easy_name.py:

    import my_super_lookup
    LookupModule = my_super_lookup.LookupModule
  3. Use with_easy_name: or lookup('easy_name',...) in playbooks
answered Jan 28, 2019 by Kavya

Related Questions In Ansible

0 votes
1 answer

How do I wget a file from web server using shell in the ansible playbook

Hey Ayaan, you could probably use this ...READ MORE

answered Jan 24, 2019 in Ansible by Anushri
1,386 views
0 votes
1 answer

What is the difference between the host file and an inventory file in ansible?

Actually both are same. hosts file is ...READ MORE

answered Feb 12, 2019 in Ansible by Amith
• 140 points
1,160 views
+1 vote
1 answer

Set AWS credentials in boto config file

Go to your boto config file, and ...READ MORE

answered Mar 26, 2019 in Ansible by Raymond
1,093 views
0 votes
1 answer

How to overwrite the content of a file in remote systems using Ansible playbook?

Hi@akhtar, You can find one argument in the ...READ MORE

answered 6 days ago in Ansible by MD
• 41,340 points
22 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,420 points
598 views
0 votes
1 answer
0 votes
1 answer

obtain information about a file in windows using ansible playbook

Hey @Travis, you can use the win_stat ...READ MORE

answered Jun 10, 2019 in Ansible by Drake
314 views
+1 vote
1 answer