uat(装在214上,在214上执行): cat /etc/ansible/hosts 已添加组: [hdp] 172.30.64.214 ansible_ssh_user=root 172.30.64.213 ansible_ssh_user=root 172.30.64.216 ansible_ ...
分类:
其他好文 时间:
2016-06-14 17:37:30
阅读次数:
139
实际应用-安装nginxcd/etc/ansiblemkdirnginx_installmkdir-pnginx_install/roles/{common,delete,install}/{handlers,files,meta,tasks,templates,vars}说明:roles目录下有三个角色,common为一些准备操作,delete为删除nginx的操作,install为安装nginx的操作每个角色下面又..
分类:
其他好文 时间:
2016-06-12 15:32:15
阅读次数:
482
安装yuminstall-yepel-releaseyuminstall-yansible2.配置(1)ssh密钥配置首先生成密钥对ssh-keygen-trsa直接回车即可,不用设置密钥密码这样会在root家目录下生成.ssh目录,这里面也会生成两个文件id_rsa和id_rsa.pub然后把公钥(id_rsa.pub)内容放到对方机器的/root/.ssh/autho..
分类:
其他好文 时间:
2016-06-12 15:32:12
阅读次数:
121
l生产环境中大多时候是需要管理配置文件的,安装软件包只是在初始化环境的时候用一下。下面我们来写个管理nginx配置文件的playbooklmkdir-p/etc/ansible/nginx_config/roles/{new,old}/{files,handlers,vars,tasks}l其中new为更新时用到的,old为回滚时用到的,files下面为ngin..
分类:
其他好文 时间:
2016-06-12 15:32:05
阅读次数:
649
参考文档:https://github.com/geerlingguy/ansible-role-svn
分类:
其他好文 时间:
2016-06-10 23:23:52
阅读次数:
582
一;1、安装ansible#yuminstallansible-y(可以更新下epelyum源/python2.6之以上)#wgethttp://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm#rpm-ivhpel-release-6-8.noarch.rpm2、安装验证;二;1、配置主机(免密码登录)第一种直接在ansible直接远程..
分类:
其他好文 时间:
2016-06-09 00:57:27
阅读次数:
199
[ceshi]192.168.220.98log ansible_ssh_host=192.168.220.116 ansible_ssh_port=10056 ansible_ssh_user=wwwad 名词解释: [ceshi] 这是主机组名 log:192.168.220.116的别名 an ...
分类:
其他好文 时间:
2016-06-08 12:14:09
阅读次数:
501
该文章摘自:http://my.oschina.net/firxiao/blog/343395,该文章制作笔记使用,不做他用,转载请注明原文链接出处 一、配置epel源 二、安装ansible ...
分类:
其他好文 时间:
2016-06-06 12:07:47
阅读次数:
118
能用,写的太差更新点把项目和tomcat启动程序分开加点变量1.catroles/http/tasks/main.yml
-name:pro
file:path=/opt/apps/{{pro_dir}}state=directory
-name:copyprofile
copy:src=/opt/src/profiledest=/etc/profileforce=yesowner=rootgroup=rootmode=0644
-name:copyjdk
co..
分类:
其他好文 时间:
2016-06-02 20:14:41
阅读次数:
183