Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fatelei/ansible-playbook
My ansible playbook for automated operation and maintenance
https://github.com/fatelei/ansible-playbook
Last synced: about 1 month ago
JSON representation
My ansible playbook for automated operation and maintenance
- Host: GitHub
- URL: https://github.com/fatelei/ansible-playbook
- Owner: fatelei
- Created: 2016-01-01T15:57:22.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-28T12:14:41.000Z (almost 9 years ago)
- Last Synced: 2024-04-09T21:54:11.466Z (9 months ago)
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ansible-playbook
My ansible playbook for automated operation and maintenance, currently only support
ubuntu and debian. I use default hosts file location "/etc/ansible/hosts".## Command.
### Common.
This block is common task for most servers. Including:
+ Update apt source.
+ Install necessary package via apt.
+ Install supervisor.### Apt.
This block is used to install or purge package via apt. You can add installed or removed package name in
"roles/apt/vars/main.yml".#### Usage
+ Install package
```
ansible-playbook site.yml --tags "install"
```+ Purge package
```
ansible-playbook site.yml --tags "purge"
```### User & Group.
This block is used to create a user to deploy apps, and create an admin group.
The name of user and the name of group are defined in "group_vars/all". And if you want to
remove a user or group, please change the variables in "roles/user/vars/main.yml".#### Usage
+ Create a user.
```
ansible-playbook site.yml --tags "create_user" [--extra-vars "username=foo"]
```+ Create a group.
```
ansible-playbook site.yml --tags "create_group" [--extra-vars "groupname=foo"]
```+ Delete a group.
```
ansible-playbook site.yml --tags "delete_group" [--extra-vars "groupname=foo"]
```+ Give a group sudo permission.
```
ansible-playbook site.yml --tags "add_sudo" [--extra-vars "groupname=foo"]
```### File
Create app directories.
#### Usage
```
ansible-playbook site.yml --tags "create_app_dir"
```### Supervisor
Initialize supervisor config.
#### Usage
```
ansible-playbook site.yml --tags "supervisor"
```