ansible/README.md

43 lines
672 B
Markdown
Raw Normal View History

2021-02-12 22:13:37 +01:00
### Install Ansible
```
pip install -r requirements.txt
```
### Ansible Vault
To manage secrets, this repository use Ansible Vault.
Create a secret
```
ansible-vault create inv/host_vars/new.chosto.me/secrets.yml
```
Edit a secret
```
ansible-vault edit inv/host_vars/new.chosto.me/secrets.yml
```
### Server
All servers managed should have this base configuration in order to work :
- a user `chosto`
- SSH access allowed for this user
- a root access (`sudo`) for user `chosto` with a password specified as `ansible_become_pass` in inventory
*e.g.*
```
# adduser chosto
# adduser chosto sudo
```
## Usage
```
ansible-playbook [-t tag1 tag2...] all.yml
```