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
57 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,195 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
980 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
952 views
0 votes
1 answer

How do I execute a shell script and then use the result in ansible

This can work out for you: - name: ...READ MORE

answered Apr 11, 2018 in Ansible by shubham
• 6,910 points
2,664 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
498 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
301 views
+1 vote
1 answer