Replies: 3 comments 11 replies
-
Hi @sidhoah8, thank you for asking question here. Can you please provide your ansible playbook so that I can try to reproduce your issue here?
Good workaround for your local debugging. You also can extend |
Beta Was this translation helpful? Give feedback.
-
Hi @cmeissner Thanks for the quick reply. Here's the playbook:
As you see, I'm trying to connect via HTTPS. The API settings look as follows: And yep, good idea for the exception handling. I'm new to git but trying to learn so I will have a look at extending exceptions.py in phpypam :-) |
Beta Was this translation helpful? Give feedback.
-
So I tried it in But I then tried the plain python
I'm also able to 'get' data using the token.. so with The only thing I noticed when playing with
I will keep digging to see why it's not working with my setup but it doesn't appear to be a problem in |
Beta Was this translation helpful? Give feedback.
-
Thanks for creating these Ansible modules. They look really useful and I look forward to using them. But I've tried using the basic examples to create a playbook using the codeaffen.phpipam.vlan and codeaffen.phpipam.address modules and no matter what I do, they both fail authentication.
I modified the api.py class in phpypam to print the output of the requests response as otherwise, no useful information is shown:
and now I can see the following error in the Ansible output:
module_stdout": "{'code': 403, 'success': False, 'message': 'Please provide token', 'time': 0.001}\n"
I don't see anywhere that I can provide the token in Ansible. I was going to raise a bug issue and look further... but I wonder if this is user error? Am I supposed to define the "App code" somewhere or a token? I've tried creating a fresh Python virtual environment with the latest ansible, phpypam, inflection packages but no difference.
Beta Was this translation helpful? Give feedback.
All reactions