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 in Ansible by Laksha
10 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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 by Kavya

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Set AWS credentials in boto config file

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

answered Mar 26 in Ansible by Raymond
30 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,480 points
223 views
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Run Ansible adhoc commands in sequence

Hey @Thomas, by default ansible runs these ...READ MORE

answered Jan 14 in Ansible by Barbara
40 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.