Ansible: Unterschied zwischen den Versionen

Aus Fachinformatiker Azubi
Zur Navigation springen Zur Suche springen
(Code Snippets)
(Links)
 
Zeile 33: Zeile 33:
  
 
* [http://phansible.com/ Ansible Project creator]
 
* [http://phansible.com/ Ansible Project creator]
 +
* [https://galaxy.ansible.com/ Ansible Galaxy]
 
* [http://www.erikaheidi.com/talk/international-php-conference-drive-with-vagrant-and-ansible Drive with Vagrant and Ansible]
 
* [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]
 
* [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]
 
* [https://bildung.xarif.de/xwiki/bin/Articles/The+Marriage+of+Ansible+and+Docker Docker with Ansible]

Aktuelle Version vom 18. November 2015, 12:52 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

Copy config:

- name: Copy my .vimrc
  command: curl -LSso ~/.vimrc https://raw.github.com/ChengLong/configs/master/.vimrc
  sudo: no

Links