三 准备CentOS环境 yum update && yum upgrade 四 控制服务器与被管理服务器要求 Master:Python 2.6+ Slave:Python 2.4+,最好也是2.6+(CentOS 6.9自带) 1. 五 安装ansible : yum install ansible (如果提示没有此安装包,可以加入EPEL扩展包:yum install epel-release) 六 生成公钥和秘钥 使用命令ssh-keygen -...
or url had to be installed or removed together. In1.9.2this was fixed so that packages are installedinoneyumtransaction. However,ifone of the packages adds a newyumrepository that the other packages come from (such as epel-release)thenthat package needs to be installedina separate task. This...
yum:name=http://mirrors.hustunique.com/centos/6/updates/x86_64/Packages/bash-4.1.2-15.el6_5.2.x86_64.rpmstate=present when: ansible_os_family=="RedHat"and ansible_distribution_version|int>=6- name: updatebashinredhat5version yum:name=http://mirrors.hustunique.com/centos/5/updates/x86_6...
yum: name=http://mirrors.hustunique.com/centos/6/updates/x86_64/Packages/bash-4.1.2-15.el6_5.2.x86_64.rpm state=present when: ansible_os_family =="RedHat"and ansible_distribution_version|int >=6 - name: updatebashinredhat 5 version yum: name=http://mirrors.hustunique.com/centos/5/u...
[root@master src]# yum install -y gcc zlib-devel openssl openssl-devel pcre-devel 3、配置编译参数 [root@master src]# cd nginx-1.4.4 [root@master nginx-1.4.4]# ./configure \ --prefix=/usr/local/nginx \ --with-http_realip_module \ ...
### 在容器中执行一遍yum update更新下源,就是更新下缓存,不需要安装软件 问题2 TASK [tomcat :insertfirewalld rulefortomcat http port]***fatal: [10.0.3.200]: FAILED!=>{"changed":false, "failed":true, "msg": "firewalld and its python 2 module are required for this module"}RUNNINGHANDLER...
-hosts:test_hostsremote_user:rootvars:-package:httpd-service:httpdtasks:-name:install {{ package }}yum:name={{ package }} state=latest-name:copy configuration filecopy:src=/root/conf/httpd.conf dest=/etc/httpd/conf/httpd.confnotify:-restart httpdtags:-updateConf-name:start {{ service }}...
yum: name=nginx state=installed update_cache=yes - name: start nginx service: name=nginx state=started post_tasks: - shell: echo "deploy nginx over" register: ok_var - debug: msg="{{ ok_var.stdout }}" yaml文件以---开头,以表明这是一个yaml文件,就像xml文件在开头使用<?xml version="1....
# cat update_bash.yml - hosts: all remote_user: root gather_facts: True tasks: - name:updatebashinredhat6version yum:name=http://mirrors.aliyun.com/centos/6.6/os/x86_64/Packages/bash-4.1.2-29.el6.x86_64.rpm.rpm state=present ...
- zlib-devel - gd-devel - libxml2-devel - bzip2-devel - gnutls-devel - ncurses-devel - bison - bison-devel - openldap - openldap-devel - libcurl-devel - libevent - libevent-devel - expat-devel - numactl state: latest - name: 更新系统 shell: "yum update -y" args: warn: False ...