-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a8189ca
commit ee1f8e1
Showing
2 changed files
with
90 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,16 @@ | ||
# Ansible Role for User Management | ||
# Ansible Roles | ||
========= | ||
|
||
Ansible playbook to create user accounts in AWS, Jenkins, Linux, MySQL and PostgreSQL. | ||
## Structure | ||
- **ansible** | ||
This is where the various roles resides. | ||
|
||
# Requirements | ||
------------ | ||
## Prerequisites | ||
- Ansible | ||
- Python | ||
|
||
The role can be executed on any machine having Linux OS with the below packages. | ||
- Ansible | ||
- Python | ||
- pymysql | ||
- mysql-client | ||
- postgresql-client | ||
- awscli | ||
## Role List | ||
### 1. User-management | ||
[User management in various tools](/ansible/user-management/main.yml) | ||
|
||
# Role Variables | ||
-------------- | ||
|
||
Available variables are listed below (user-management/vars/main.yml): | ||
|
||
users | ||
- aws | ||
- linux | ||
- jenkins | ||
- mysql | ||
- postgres | ||
|
||
# Role tasks | ||
------------- | ||
|
||
Available tasks are listed below (user-management/tasks/) | ||
|
||
tasks | ||
- aws-add-user.yml | ||
- jenkins-add-user.yml | ||
- linux-add-user.yml | ||
- mysql-add-user.yml | ||
- postgres-add-user.yml | ||
|
||
# Dependencies | ||
------------ | ||
|
||
1. Configure AWS access key and secret key for running aws user creation. | ||
2. Modify Jenkins authorization security by enabling necessary permission for the admin user. | ||
3. Grant access to the IP from where you are running this playbook in the MySQL server. | ||
4. Allow necessary access in all the servers. | ||
|
||
|
||
# Example Playbook | ||
---------------- | ||
|
||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: | ||
|
||
--- | ||
- name: Ansible roles to create/manage users | ||
hosts: servers | ||
gather_facts: true | ||
become: yes | ||
roles: | ||
- role: user-management | ||
|
||
The same is provided in the main.yml residing outside the role. You can use the following command to run all the tasks. | ||
|
||
### ansible-playbook main.yml | ||
|
||
You can use --skip-tags to exclude any particular role | ||
|
||
### Ex: ansible-playbook main.yml --skip-tags linux | ||
|
||
# License | ||
------- | ||
|
||
BSD | ||
|
||
# Author Information | ||
------------------ | ||
|
||
QBurst DevOps Team | ||
This role will help you to manage/create users in various tools. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Ansible Role for User Management | ||
========= | ||
|
||
Ansible playbook to create user accounts in AWS, Jenkins, Linux, MySQL and PostgreSQL. | ||
|
||
# Requirements | ||
------------ | ||
|
||
The role can be executed on any machine having Linux OS with the below packages. | ||
- Ansible | ||
- Python | ||
- pymysql | ||
- mysql-client | ||
- postgresql-client | ||
- awscli | ||
|
||
# Role Variables | ||
-------------- | ||
|
||
Available variables are listed below (user-management/vars/main.yml): | ||
|
||
users | ||
- aws | ||
- linux | ||
- jenkins | ||
- mysql | ||
- postgres | ||
|
||
# Role tasks | ||
------------- | ||
|
||
Available tasks are listed below (user-management/tasks/) | ||
|
||
tasks | ||
- aws-add-user.yml | ||
- jenkins-add-user.yml | ||
- linux-add-user.yml | ||
- mysql-add-user.yml | ||
- postgres-add-user.yml | ||
|
||
# Dependencies | ||
------------ | ||
|
||
1. Configure AWS access key and secret key for running aws user creation. | ||
2. Modify Jenkins authorization security by enabling necessary permission for the admin user. | ||
3. Grant access to the IP from where you are running this playbook in the MySQL server. | ||
4. Allow necessary access in all the servers. | ||
|
||
|
||
# Example Playbook | ||
---------------- | ||
|
||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: | ||
|
||
--- | ||
- name: Ansible roles to create/manage users | ||
hosts: servers | ||
gather_facts: true | ||
become: yes | ||
roles: | ||
- role: user-management | ||
|
||
The same is provided in the main.yml residing outside the role. You can use the following command to run all the tasks. | ||
|
||
### ansible-playbook main.yml | ||
|
||
You can use --skip-tags to exclude any particular role | ||
|
||
### Ex: ansible-playbook main.yml --skip-tags linux | ||
|
||
# License | ||
------- | ||
|
||
BSD | ||
|
||
# Author Information | ||
------------------ | ||
|
||
QBurst DevOps Team |