摘要: 在这整个ansible配置中,最值得我们关注的是配置文件、主机列表文件, Ansible 配置 /etc/ansible/ansible.cfg ##ansible 配置文件,保留默认即可 [defaults]#inventory = /etc/ansible/hosts #主机列表配置文件#lib 阅读全文
posted @ 2018-02-03 10:56 血与火的洗礼 阅读(204) 评论(0) 推荐(0) 编辑
摘要: ansible 模块 command 模块 注解:不支持管道和重定向 ansible test -m command -a 'echo redhat | passwd --stdin mageedu' - chdir cd into this directory before running the 阅读全文
posted @ 2018-01-31 17:12 血与火的洗礼 阅读(149) 评论(0) 推荐(0) 编辑
摘要: ansible 命令详解: Usage: ansible <host-pattern> [options] example: ansible 192.168.134.202 -m command -a "ls /tmp/zhangfengxue.yml" -k ##远程执行ls命令并询问密码; Op 阅读全文
posted @ 2018-01-31 14:04 血与火的洗礼 阅读(596) 评论(0) 推荐(0) 编辑
摘要: Ansible的优点: Agentless (去中心化) Stupied Simple SSH by default YAML no code Ansible 使用场景: 文件传输, (1)scp mv cp rsync 命令执行: (2) 剩下的其他命令 安装http服务: 安装() 配置() 启 阅读全文
posted @ 2018-01-31 11:25 血与火的洗礼 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 获取ansible的方法: ansible 官网下载 epel源 ansible 介绍: Ansible 是一个配置管理和应用部署工具,功能类似于目前业界的配置管理工具 Chef,Puppet,Saltstack。Ansible 是通过 Python 语言开发。Ansible 平台由 Michael 阅读全文
posted @ 2018-01-31 01:48 血与火的洗礼 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 目前,比较流行开源集群管理工具是haproxy + keepalived 是比较简单易学的组合; 主机环境: Cent OS 6.8x64 软件版本: haproxy-1.5.18-6.el7.x86_64.rpm keepalived-1.3.5-1.el7.x86_64.rpm 网络配置: we 阅读全文
posted @ 2018-01-29 16:48 血与火的洗礼 阅读(680) 评论(0) 推荐(0) 编辑
摘要: nginx + keepalived 简易配置,实现HA + LB 阅读全文
posted @ 2018-01-29 00:54 血与火的洗礼 阅读(302) 评论(0) 推荐(0) 编辑