User Tools

Site Tools


sysadmin_misc:ansible

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
sysadmin_misc:ansible [2018/09/25 15:00]
127.0.0.1 external edit
sysadmin_misc:ansible [2020/04/14 12:51] (current)
adyxax
Line 1: Line 1:
 ====== Ansible ====== ====== Ansible ======
- +~~REDIRECT>​https://​newwiki.adyxax.org/​blog/​ansible/​~~
-  * Install roles : ''​ansible-galaxy install ​ -r requirements.yml''​ +
-  * Update a role : ''​ansible-galaxy remove mysql && ansible-galaxy install ​ -r requirements.yml''​ +
-  * Run a playbook : +
-<code> +
-ansible-playbook playbooks/​bdd.yml -l bdd1 -t mysql --ask-vault +
-ansible-playbook playbooks/​phpipam.yml -e "​target=awhphpipam1 php_reinstall=true"​ --ask-vault +
-</​code>​ +
-  * edit a vault protected file : ''​ansible-vault edit mysql-vault.yml''​ +
-  * Put a private key in vault : +
-<​code>​ +
-ssl_key : | +
-  ----- BEGIN PRIVATE KEY ----- +
-  blahblahblah +
-  blahblahblah +
-  ----- END PRIVATE KEY ----- +
-</​code>​ +
-and +
-<​code>​ +
-- copy: +
-    path: /​etc/​ssl/​private.key +
-    mode: 0400 +
-    content: '{{ ssl_key }}' +
-</​code>​ +
- +
-Breaking long lines : https://watson-wilson.ca/blog/2018/07/11/ansible-tips/+
sysadmin_misc/ansible.txt · Last modified: 2020/04/14 12:51 by adyxax