notebook/IT/ansible.md

24 lines
557 B
Markdown
Raw Normal View History

2020-11-26 17:38:25 +00:00
# ansible
2021-04-20 18:56:58 +00:00
2021-01-24 16:52:22 +00:00
![ansible](img/ansible.png)
2021-04-20 18:56:58 +00:00
2020-11-26 17:38:25 +00:00
## commande ansible
***launch playbook on staging***
`ansible-playbook -i staging site.yml --vault-password-file=.vaultpassword`
***init new role architecture***
2021-04-20 18:56:58 +00:00
`ansible-galaxy user_config init`
2020-11-26 17:38:25 +00:00
***launch ansible bootstrap***
2021-04-20 18:56:58 +00:00
`ansible-playbook -i nas, bootstrap.yml -u root --ask-pass`
2020-11-26 17:38:25 +00:00
***encrypt string***
`ansible-vault encrypt_string`
2021-04-20 18:56:58 +00:00
## ignore know host file on ansible
```bash
2020-11-26 17:38:25 +00:00
export ANSIBLE_HOST_KEY_CHECKING=False
--ssh-extra-args='-o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null'
2021-01-24 16:52:22 +00:00
```