So what is the proper way of configuring the dynamic inventory plugin in
the ansible-config ?
my ansible.cfg looks as follows.
[inventory]
# List of enabled inventory plugins and the order in which they are used.
enable_plugins = auto, yaml
# Ignore these extensions when parsing a directory as
I am running it as sudo,
On Wed, Oct 14, 2020 at 5:54 AM prajwal wrote:
> Try to run with the sudo command
>
> On Wed, 14 Oct, 2020, 2:51 pm sk32...@gmail.com,
> wrote:
>
>> yep I did chmod a+x get_branch.py
>>
>> no luck with that too and I did the same to the config file as well,
>>
>> On We
Try to run with the sudo command
On Wed, 14 Oct, 2020, 2:51 pm sk32...@gmail.com, wrote:
> yep I did chmod a+x get_branch.py
>
> no luck with that too and I did the same to the config file as well,
>
> On Wednesday, October 14, 2020 at 5:13:08 AM UTC-4 dick@geant.org
> wrote:
>
>> ah i think
yep I did chmod a+x get_branch.py
no luck with that too and I did the same to the config file as well,
On Wednesday, October 14, 2020 at 5:13:08 AM UTC-4 dick@geant.org wrote:
> ah i think i see, the inventory script needs to be executable - can
> you check that?
>
> On Wed, 14 Oct 2020 at
ah i think i see, the inventory script needs to be executable - can
you check that?
On Wed, 14 Oct 2020 at 11:04, sk32...@gmail.com wrote:
>
> It starts with a shebang, and it is parsing a .ini config file, below is the
> code,
>
> #!/usr/bin/env python3
>
> import os
> import sys
> import argpa
https://github.com/ansible/ansible/blob/stable-2.9/lib/ansible/plugins/inventory/script.py
#L161
this line does it expects a precise format, as the script is returning a
precise json format, not sure what I am doing wrong, to have that exception
raised, I have given a proper file path,
ansib
It starts with a shebang, and it is parsing a .ini config file, below is
the code,
#!/usr/bin/env python3
import os
import sys
import argparse
import json
import logging
import configparser
import re
try:
import ldap3
except ImportError:
print('Could not import \'ldap3\' module.')
print('Please
Maybe the python environments are different between the manually run
script and the ansible run one?
What does the get_branches.py look like?
On Wed, 14 Oct 2020 at 10:27, sk32...@gmail.com wrote:
>
> when I run the script with python on command line, I get the json output,
> however when I run
when I run the script with python on command line, I get the json output,
however when I run it with ansible-inventory or ansible-playbook I hit the
following error
ansible-inventory 2.9.6
config file = /Users/sm/ansible_liquibase/ansible.cfg
configured module search path = ['/Users/sm/.ans