Got script from link you gave of github.
For making script executable doing chmod. Isnt required ??

On Mon, 14 Dec 2020, 18:34 Abhijeet Kasurde, <[email protected]> wrote:

> Hi Parth,
>
> 1. Where did you get ec2.py?
> 2. Why are you doing chmod ?
>
> Please refer
> https://docs.ansible.com/ansible/latest/plugins/inventory.html#using-inventory-plugins
> for using aws_ec2 dynamic inventory plugin.
>
> On Mon, Dec 14, 2020 at 5:05 PM Parth Patel <[email protected]>
> wrote:
>
>> Has script been tested and working fine ? I am getting syntax error.
>>
>> [ansible@ip-172-3xxxx dynamic_inventory]$ chmod 755 ec2.py?
>> [ansible@ip-172-3xxxx dynamic_inventory]$ ./ec2.py
>> ./ec2.py: line 4: syntax error near unexpected token `('
>> ./ec2.py: line 4: `from __future__ import (absolute_import, division,
>> print_function)'
>>
>>
>> https://github.com/ansible-collections/amazon.aws/blob/main/plugins/inventory/aws_ec2.py
>>
>>
>> On Monday, December 14, 2020 at 5:00:46 PM UTC+5:30 Abhijeet Kasurde
>> wrote:
>>
>>> Using dynamic inventory plugin -
>>> https://docs.ansible.com/ansible/latest/plugins/inventory.html#using-inventory-plugins
>>>
>>> On Mon, Dec 14, 2020 at 4:59 PM Abhijeet Kasurde <[email protected]>
>>> wrote:
>>>
>>>> Yes, you may want to refer
>>>> https://docs.ansible.com/ansible/latest/collections/amazon/aws/aws_ec2_inventory.html
>>>> for aws_ec2.
>>>>
>>>>
>>>> On Mon, Dec 14, 2020 at 4:53 PM Parth Patel <[email protected]>
>>>> wrote:
>>>>
>>>>> Ahh okay thanks buddy. So below link is official ansible doc site
>>>>> right ?
>>>>>
>>>>>
>>>>> https://docs.ansible.com/ansible/latest/user_guide/intro_dynamic_inventory.html
>>>>>
>>>>> Thanks,
>>>>> P
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Dec 14, 2020 at 4:50 PM Abhijeet Kasurde <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> Hi Parth,
>>>>>>
>>>>>> You are using docs which are not official docs. Also, EC2 external
>>>>>> inventory script is replaced by aws_ec2 inventory plugin.
>>>>>>
>>>>>> You can find it here -
>>>>>> https://github.com/ansible-collections/amazon.aws/blob/main/plugins/inventory/aws_ec2.py
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Mon, Dec 14, 2020 at 4:46 PM Parth Patel <[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>>> HI Team,
>>>>>>>
>>>>>>> On page
>>>>>>> https://ansible-docs.readthedocs.io/zh/stable-2.0/rst/intro_dynamic_inventory.html#example-aws-ec2-external-inventory-script
>>>>>>>
>>>>>>>
>>>>>>> Link to ec2 dynamic python inventory script, i see 404 not found
>>>>>>> error. Can anyone assist me please ?
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Parth
>>>>>>>
>>>>>>> --
>>>>>>> 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/013fa232-8804-4ff8-8f5f-8acdde17d6fcn%40googlegroups.com
>>>>>>> <https://groups.google.com/d/msgid/ansible-project/013fa232-8804-4ff8-8f5f-8acdde17d6fcn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Thanks,
>>>>>> Abhijeet Kasurde
>>>>>>
>>>>>> --
>>>>>> 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/CAFwWkHoAO7WpcnNvNwAmxUbBZK45XP4PvegGcMZwV8yJRxCb0A%40mail.gmail.com
>>>>>> <https://groups.google.com/d/msgid/ansible-project/CAFwWkHoAO7WpcnNvNwAmxUbBZK45XP4PvegGcMZwV8yJRxCb0A%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>> --
>>>>> 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/CAEMGyL%2Bvi9b-8L%3DDscPQ1wxW6uhtiu4VqSLj6nTaN8tgnAmuHw%40mail.gmail.com
>>>>> <https://groups.google.com/d/msgid/ansible-project/CAEMGyL%2Bvi9b-8L%3DDscPQ1wxW6uhtiu4VqSLj6nTaN8tgnAmuHw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>>
>>>>
>>>> --
>>>> Thanks,
>>>> Abhijeet Kasurde
>>>>
>>>
>>>
>>> --
>>> Thanks,
>>> Abhijeet Kasurde
>>>
>> --
>> 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/0b8854a1-e769-4677-abc1-8bdd117ccae8n%40googlegroups.com
>> <https://groups.google.com/d/msgid/ansible-project/0b8854a1-e769-4677-abc1-8bdd117ccae8n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> --
> Thanks,
> Abhijeet Kasurde
>
> --
> 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/CAFwWkHr0YR%2BWNDnquG8ao0joPfEpx68cR%3DRzL4kqXWA8iO7b%2Bg%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAFwWkHr0YR%2BWNDnquG8ao0joPfEpx68cR%3DRzL4kqXWA8iO7b%2Bg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAEMGyLK_7KL3NJF7%2BEFWgezZS43TuRf22rsdMgnF%3DuLcpbWs1w%40mail.gmail.com.

Reply via email to