Ansible: Unterschied zwischen den Versionen

Aus Fachinformatiker Azubi
Zur Navigation springen Zur Suche springen
(init)
 
(Links)
Zeile 25: Zeile 25:
 
== Links ==
 
== Links ==
  
* [http://www.erikaheidi.com/talk/international-php-conference-drive-with-vagrant-and-ansible DRIVE WITH VAGRANT AND ANSIBLE]
+
* [http://phansible.com/ Ansible Project creator]
 +
* [http://www.erikaheidi.com/talk/international-php-conference-drive-with-vagrant-and-ansible Drive with Vagrant and Ansible]
 +
* [http://www.erikaheidi.com/blog/configuring-ssh-server-access-for-ansible Ansible SSH connection]
 +
* [https://bildung.xarif.de/xwiki/bin/Articles/The+Marriage+of+Ansible+and+Docker Docker with Ansible]

Version vom 17. November 2015, 11:29 Uhr

Ansible ist eine Softlösung für das provisionieren (Provisioning).

Code Snippets

Start a command:

ansible testservers -i test -m "uptime" -k -vvvv -u root
ansible testservers -i test -a "uptime" -k -u root

Task lineinfile:

- name: set APP_DEBUG=false
  lineinfile: dest=/var/www/laravel/.env regexp='^APP_DEBUG=' line=APP_DEBUG=false

- name: set APP_ENV=production
  lineinfile: dest=/var/www/laravel/.env regexp='^APP_ENV=' line=APP_ENV=production

Start playbook:

ansible-playbook playbook-digitalocean.yml -i inventories/dev --private-key=/home/USER/.ssh/id_rsa -u root

Links