Closed maartenq closed 6 years ago
I'll take a look at this as soon as I get a chance. I still want to apply some of the missing variable name cleanups from PR #1 but I wanted to separate the indentation cleanups from the logic cleanups first. This is a bit of a spare time project and I haven't had much of that in the last few weeks. Thanks for providing feedback!
Hi Steve,
I have withdrawned pull request #1 as you had you had incorporated most of the changes anyway. Pull request #3 just fixes an indentation error introduced with that changes.
After this there still can be some PEP8 stuff done. I like to add code that reads the credentials from environment vars and optional from an .ini config, so it can used in Tower/AWX without incorporate them in the code.
If you have merged #3 I will do some pull requests.
I could also make some tests if you like, but that will introduce some develop dependencies: like Pytest and Mockldap https://pypi.python.org/pypi/mockldap/0.2.8
Regards, Maarten
Makes sense. I wrote this in the first place to use it with Tower/AWX, but the goal was just to get it working for demo purposes when I threw it together and not to worry about properly protecting the credentials...that was on my longer-term radar.
$ python ldap-freeipa.py File "ldap-freeipa.py", line 101 break SyntaxError: 'break' outside loop