Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diptochakrabarty/aws-ansible-user-manager
Manage multiple user accounts in your ec2 instances by creating or deleting users and also enable ssh based login for each user using their public key files
https://github.com/diptochakrabarty/aws-ansible-user-manager
ansible ansible-playbook aws aws-ec2 cloud pem private-key public-key-cryptography ssh ssh-server
Last synced: 20 days ago
JSON representation
Manage multiple user accounts in your ec2 instances by creating or deleting users and also enable ssh based login for each user using their public key files
- Host: GitHub
- URL: https://github.com/diptochakrabarty/aws-ansible-user-manager
- Owner: DiptoChakrabarty
- License: mit
- Created: 2020-06-24T05:02:40.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-08-02T01:32:39.000Z (over 1 year ago)
- Last Synced: 2024-05-01T16:56:08.182Z (7 months ago)
- Topics: ansible, ansible-playbook, aws, aws-ec2, cloud, pem, private-key, public-key-cryptography, ssh, ssh-server
- Homepage:
- Size: 9.18 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aws-ansible-user-manager
- Add Users in your ec2 server using public keys and ip address
- Also add your keys to the instance### How to configure
```sh
- Activate virtual env using source venv/bin/activate
- Add your pem file path in ansible.cfg -> private_key_file
- ssh-add
- In hosts file add in this format under aws group { instance ip address} ansible_ssh_user={ user to connect} ansible_ssh_private_key_file= { pvt key path }
- For ubuntu user will be ubuntu and centos user is ec2-user
- Add your users key to add in instance in ssh directory
- Name the key as {username}.pub
- Add all users in users.yml file
- To add or remove change state variable in users.yml to present or absent```
### key.yml format to launch instances
```shaccess_key: ""
secret_key: ""
region: ""
ami: ""
security_group: ""
subnet: ""
key_name: ""```
### Running the script
```sh
- To launch new instance
ansible-playbook --vault-password-file=".password" -i ./hosts ec2_launch.yml- To manage users
ansible-playbook ec2_users.yml```