Open Trozz opened 5 years ago
Thanks for this. I am a little bit hesitant to merge it as is because of the significant amount of code duplication, it might create a maintainability nightmare moving forward, requiring to cherry pick each change into both files.
Can you by any chance think of a way to implement the support to Python 2 + 3 that is more idiomatic, perhaps in the same script?
This might not be possible (admittedly I've never used boto3, so I'm not aware of how much changed), so I'm just asking for my information.
Thanks again
well boto3 is supported under python2 so I could write in python2 that is compatible with python3.
@gianlucaborello this is now pep8 compliant and works in both python2 / python3 using boto3
@gianlucaborello any chance of merging?
Sorry, I've been super busy and had no time to review this. I will be able to take a look and test it after things calm down a little from my end. Thanks.
Sent a PR https://github.com/Trozz/aws-ssh-config/pull/2
Not a python guy, also unfamiliar with boto3 lib, so there's probably a better way without this branching but i'm just limiting my exposure so i dont end up in the weeds. I'm now using this in my ansible playbooks.
Here's my usage in production. It's working well with the updated version, and i removed my python2 dependency.
- name: Update ssh config
shell: ./aws-ssh-config.py --private --tags Name --default-user ubuntu > .ssh/config
become_user: ubuntu
args:
chdir: /home/ubuntu
Sent a PR Trozz#2
Not a python guy, also unfamiliar with boto3 lib, so there's probably a better way without this branching but i'm just limiting my exposure so i dont end up in the weeds. I'm now using this in my ansible playbooks.
Here's my usage in production. It's working well with the updated version, and i removed my python2 dependency.
- name: Update ssh config shell: ./aws-ssh-config.py --private --tags Name --default-user ubuntu > .ssh/config become_user: ubuntu args: chdir: /home/ubuntu
looks good, I wonder if you would be able to generate the same thing using the Ansible dynamic inventories :-)
@gianlucaborello any luck getting this in
@gianlucaborello appreciate that you've probably had other things going on, if you would like I am happy to become a collaborator on this with you to keep development up
Hi @gianlucaborello,
Hope all is well, any chance we can look to get these merged? I would be happy to take over this repo if you no-longer have the time
Trozz
Just a little nudge to show interest in this merge. This tool is useful and it would be very nice to have it working again
Wanted to bump this as well, would be great to have an update
added a version of the file support Python 3 and boto3, functionality is the same still
if you want I will rewrite the base file as well as submit a setup.py file to support running and installing the script as an application