# yum install ansible
# apt-get install ansible
# pip install ansible
Très peu de dépendances:
# /etc/ansible/hosts
ldap.example.com
[webapps]
web[0:8].example.com
[database]
db-[a:c].example.com ansible_ssh_user=postgres
[prod]
web
database
$ ansible all -m ping
$ ansible prod -m yum -a name=\* state=latest
$ ansible !db -m yum -a name=\* state=latest
# requiert python 2.5+, python-keyczar
- hosts: web
accelerate: true
# accelerate_port: 5099
- name: check/create webservers
hosts: webservers
user: root
tasks:
- name: install httpd
action: yum state=installed name=$item
with_items:
- httpd
- mod_wsgi
- postgresql-server
- name:
service: name=httpd enabled=yes state=started
$ ansible-playbook check.yml
docs.ansible.com
galaxy.ansible.com
https://github.com/ansible/ansible-redhat-openstack
$ ansible-playbook -i hosts site.yml
$ ansible-playbook -i hosts playbooks/image.yml -e "image_name=cirros image_url=https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img"
CentOS dojo à Lyon le 11 avril @Epitech
Plus d'informations sur le wiki CentOS: http://wiki.centos.org/Events/Dojo/Lyon2014
Table of Contents | t |
---|---|
Exposé | ESC |
Full screen slides | e |
Presenter View | p |
Source Files | s |
Slide Numbers | n |
Toggle screen blanking | b |
Show/hide slide context | c |
Notes | 2 |
Help | h |