返回顶部

随笔分类 -  ansible

ansible基础元素
摘要:一.模块安装 二. 常用模块 command 不指定模块默认command模块 shell模块(万能模块) 参数:chdir 在执行这个命令前,先切换目录 参数:creates 判断一个文件是否存在,如果已经存在了,后面的命令就不会执行 参数:removes 判断一个文件是否存在,如果不存在,后面的 阅读全文

posted @ 2018-12-07 21:23 augustyang 阅读(267) 评论(0) 推荐(0)

ansible-play
摘要:#1 - hosts: test user: root tasks: - name: create nginx group group: name=nginx system=yes gid=208 - name: create nginx user user: name=nginx system=yes uid=208 group=nginx - hos... 阅读全文

posted @ 2018-06-28 15:41 augustyang 阅读(362) 评论(0) 推荐(0)

ansible安装
摘要:yum install gcc-c++ -y #安装第三方epel源 #centos6 [root@ansible ~]# rpm -ivh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm [root@ansible ~]# yum install ansible [root@an... 阅读全文

posted @ 2017-04-17 17:46 augustyang 阅读(244) 评论(0) 推荐(0)

ansible-palybook
摘要:yum 下载 启动 添加add - name: install httpd service hosts: nginx tasks: - name: install yum: name=httpd state=present - name: service on service: name=httpd 阅读全文

posted @ 2017-04-17 04:38 augustyang 阅读(414) 评论(0) 推荐(0)

导航