Ansible is a radically simple configuration-management, application deployment, task-execution, and multinode orchestration engine.
Design Principles
Have a dead simple setup process and a minimal learning curve
Be super fast & parallel by default
Require no server or client daemons; use existing SSHd
Use a language that is both machine and human friendly
Focus on security and easy auditability/review/rewriting of content
Manage remote machines instantly, without bootstrapping
Allow module development in any dynamic language, not just Python
Be usable as non-root
Be the easiest IT automation system to use, ever.
[iyunv@svn ~]# cd /etc/ansible/
[iyunv@svn ansible]# ls
ansible.cfg hosts roles
[iyunv@svn ansible]# vim hosts
:.,$s/^\([^[:space:]#]\)/#\1/g注释掉例子再配置
[webservers]
rs1.abc.com
rs2.abc.com
[dbservers]
master.abc.com
3.5 任何svn联系被控制主机,基于ssh连接
[iyunv@svn ansible]# ssh-keygen -t rsa -P ''
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
71:dd:e4:81:47:bc:39:f3:b2:2b:9e:72:87:bc:60:b8 root@svn.abc.com
The key's randomart image is:
+--[ RSA 2048]----+
| ++ |
| ..+o. |
| . . ..oo |
| o = |
| S + |
| . . .|
| . o. . o |
| o..=.o |
| E +++.. |
+-----------------+