vim packages.yml 执行方法: ansible-playbook packages.yml 注意要点:使用ansible的yum模块 ...
分类:
其他好文 时间:
2017-09-12 13:34:35
阅读次数:
142
第1章创建配置文件1.1编写创建密钥对和分发脚本[root@m01scripts]#cat/server/scripts/fenfa.sh#!/bin/bash##createkeypair##创建密钥对ssh-keygen-tdsa-f/root/.ssh/id_dsa-P""##fenfa##非交互式分发到每台主机foripin1718141doecho"========fenfakeytohost172.16.1.$ip======..
分类:
其他好文 时间:
2017-09-11 18:24:28
阅读次数:
272
章节介绍一、ansible是个什么东西呢?二、ansible有如下优点:三、ansible安装四、ansibl语法格式:五、ansible帮助模块:六、ansible参数详细介绍七、ANSIBLE剧本(PLAYBOOKS)功能一、ansible是个什么东西呢?官方的title是“AnsibleisSimpleITAutomation”——简单的自动化I..
分类:
其他好文 时间:
2017-09-11 18:17:49
阅读次数:
216
ansible的使用:http://perin.blog.51cto.com/10410663/1726277http://www.mamicode.com/info-detail-1428476.html一、安装ansible1、python版本需要2.6以上,不过通过centos7都会默认安装上python2.7.5,查看方法:python-V2、添加yum源a、vim/etc/yum.repos.d/ansible.repob..
分类:
其他好文 时间:
2017-09-11 18:15:05
阅读次数:
262
1.准备一个文件放入所有需要升级的服务器IP:ansible_failed_ip.txt2.写一个用于在远程执行的脚本:update.sh[root@shvpuppet01scripts]#catupdate.sh
#!/bin/bash
tarxf/usr/local/src/Python-2.7.13.tgz-C/usr/local/src/
cd/usr/local/src/Python-2.7.13&&./configu..
分类:
编程语言 时间:
2017-09-11 18:03:19
阅读次数:
128
特性 (1)、no agents:不需要在被管控主机上安装任何客户端; (2)、no server:无服务器端,使用时直接运行命令即可; (3)、modules in any languages:基于模块工作,可使用任意语言开发模块; (4)、yaml,not code:使用yaml语言定制剧本pl ...
分类:
其他好文 时间:
2017-09-08 16:19:36
阅读次数:
156
创建配置文件[root@m01tools]#catnfspeizhi.shcat>>/etc/exports<<EOF/data172.16.1.0/24(rw,sync)EOF剧本:[root@m01tools]#catnfspiliang.yml-hosts:172.16.1.131#服务端tasks:-name:yumshell:yuminstall-ynfs-utilsrpcbind#安装nfs-name:yunmshell:yum-yinstall..
分类:
其他好文 时间:
2017-09-08 11:56:04
阅读次数:
300
首先创建一个脚本文件/server/tools/peizhi.shcat/server/tools/peizhi.shcat>>/etc/rsyncd.conf<<EOF#luo##paichu.sh##uid=rsyncgid=rsyncusechroot=nomaxconnections=200timeout=300pidfile=/var/run/rsyncd.pidlockfile=/var/run/rsync.locklogfile=/var/log/rs..
分类:
其他好文 时间:
2017-09-08 10:08:01
阅读次数:
113
首先创建一个脚本文件/server/tools/peizhi.shcat/server/tools/peizhi.shcat>>/etc/rsyncd.conf<<EOF#luo##paichu.sh##uid=rsyncgid=rsyncusechroot=nomaxconnections=200timeout=300pidfile=/var/run/rsyncd.pidlockfile=/var/run/rsync.locklogfile=/var/log/rs..
分类:
其他好文 时间:
2017-09-08 10:06:58
阅读次数:
174
[root@m01 tools]# cat nfspeizhi.shcat >>/etc/exports<<EOF /data 172.16.1.0/24(rw,sync)EOF - hosts: 172.16.1.131 #服务端 tasks: - name: yum shell: yum ins ...
分类:
其他好文 时间:
2017-09-08 10:06:48
阅读次数:
740