aws-ssh-config icon indicating copy to clipboard operation
aws-ssh-config copied to clipboard

create a version that supports boto3/python3, updated requirements file

Open Trozz opened this issue 6 years ago • 12 comments

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

Trozz avatar Feb 14 '19 10:02 Trozz

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

gianlucaborello avatar Mar 07 '19 04:03 gianlucaborello

well boto3 is supported under python2 so I could write in python2 that is compatible with python3.

Trozz avatar Mar 20 '19 22:03 Trozz

@gianlucaborello this is now pep8 compliant and works in both python2 / python3 using boto3

Trozz avatar Mar 20 '19 23:03 Trozz

@gianlucaborello any chance of merging?

Trozz avatar Jun 26 '19 22:06 Trozz

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.

gianlucaborello avatar Aug 07 '19 15:08 gianlucaborello

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

rromanchuk avatar Mar 10 '20 22:03 rromanchuk

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 :-)

Trozz avatar Mar 16 '20 00:03 Trozz

@gianlucaborello any luck getting this in

Trozz avatar Apr 22 '20 22:04 Trozz

@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

Trozz avatar Sep 03 '20 15:09 Trozz

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

Trozz avatar May 16 '21 11:05 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

borisvezmar avatar Oct 05 '21 15:10 borisvezmar

Wanted to bump this as well, would be great to have an update

noahdahlman avatar Oct 15 '21 02:10 noahdahlman