python版本:Python 2.6.6 ansible版本:ansible 2.3.1.0 调用脚本: task_exec_v1.py 附playbook脚本:test_ping.yml python3.5调用ansible参考文档: https://www.cnblogs.com/stones ...
分类:
编程语言 时间:
2018-03-01 14:48:29
阅读次数:
1228
from collections import namedtuplefrom ansible.executor.playbook_executor import PlaybookExecutorfrom ansible.inventory import Inventoryfrom ansible.p... ...
分类:
其他好文 时间:
2018-03-01 13:28:46
阅读次数:
185
一、 自我介绍 1min:做过互联网云计算、网络游戏等的运维,有多年的运维经验 二、 介绍传统运维的痛处和ansible的优势 5min 三、 安装ansible 2min 四、 配置主机密钥配对:2min 用ssh-keygen生成key,把公钥拷贝到对方的.ssh目录下authorized_ke ...
分类:
其他好文 时间:
2018-03-01 13:25:48
阅读次数:
155
查看组内主机列表ansiblewebservers--list-hosts执行命令-mshell#ansibleall-mshell-a‘hostname‘复制文件-mcopy#ansibleall-mcopy-a‘src=/etc/hostsdest=/etc/hosts‘用户管理-muser添加用户#ansibleall-muser-a"name=la
分类:
其他好文 时间:
2018-02-28 18:07:44
阅读次数:
138
一、ansible 安装 1.ubuntu: sudo apt-get install ansible 2.centos: sudo yum -y install ansible 3.安装好后验证是否已经安装:ansible --version,如果出现版本号,则表示安装正常 二、ansible批量 ...
分类:
其他好文 时间:
2018-02-27 19:22:50
阅读次数:
164
运维工作:系统安装(物理机、虚拟机)à 程序包安装、配置、服务启动 à 批量操作 à 程序发布 à 监控OS Provisioning: 物理机:PXE、Cobbler 虚拟机:Image TemplatesConfiguration: &nbs
分类:
系统相关 时间:
2018-02-23 12:04:29
阅读次数:
207
环境操作系统:cat/etc/redhat-releaseRedHatEnterpriseLinuxServerrelease7.2(Maipo)Python版本:python-VPython2.7.5一、安装setuptools,setuptools带有easy_install#https://pypi.python.org/pypiwgethttps://pypi.python.org/pac
分类:
其他好文 时间:
2018-02-22 23:08:11
阅读次数:
210
saltansible服务安装salt h112 ?pkg.install nginxansible h112 -m apt -a "name=nginx state=present"服务停止salt h112 service.stop nginxansible h112 -m service -a "name=nginx state=stopped&quo
分类:
其他好文 时间:
2018-02-22 19:31:37
阅读次数:
149