copy: src=nginx-{{ nginx_version }}.tar.gz dest={{ nginx_dir }}/nginx-{{ nginx_version }}.tar.gz owner=root group=root-name: Copy install_nginx.sh copy: src=install_nginx.sh dest=/tmp/install_nginx.sh-name: uncompress nginx.tar.gz shell: tar-xf {{ nginx_dir }}/nginx-{{ ng...
安装nginx 代码语言:javascript 复制 [root@ansbile01~/roles]$ cat nginx/tasks/install.yml-name:install nginx codeshell:chdir:"{{ download }}/{{ nginx_ver }}"cmd:>./configure--prefix={{install_dir}}/{{nginx_ver}}--sbin-path={{sbin_path}}--conf-path={{conf_path}}--error-log-path=...
[[emailprotected]nginx_install]# cd tasks/[[emailprotected]tasks]# cat main.yml-name:copynginxpackageto remote hostcopy:src=nginx-1.12.0.tar.gz dest=/tmp/nginx-1.12.0.tar.gz ##拉取nginx解压吧tags:cppkg-name:tarnginxshell:cd/tmp;tar-xf nginx-1.12.0.tar.gz ##解压nginx包-name:install...
[root@maaster01 ~]# yum install -y ansible 1. ansible参数 [root@master01 ~]# ansible --version ansible 2.9.6 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location...
-nginx_install###roles目录下的nginx_install目录 -nginx_config###roles目录下的nginx_config目录 5、查看目录结构: [root@cml1 roles]# tree . ├── nginx_config │ ├── default │ ├── files │ ├── handlers │ │ └── main.yml ...
error"useradd-M -s /sbin/nologin nginx &>dev/nullcd~tar xf nginx-1.10.2.tar.gz -C /usr/src/cd/usr/src/nginx-1.10.2/./configure --user=nginx --group=nginx --prefix=/usr/local/nginx-1.10.2/ --with-http_stub_status_module --with-http_ssl_module && make && make install &>/...
- name: install nginx shell: cd /usr/local/src/nginx-1.12.0;./configure --user=nginx --group=nginx --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre;make && make install tags: inngx ...
1、yum 安装LNMP环境首先我们可以在ansible服务器上安装LNMP环境,然后再将配置文件通过ansible拷贝到远程主机上1.1、安装nginx软件yum -y install nginx #通过aliyun和epel源安装systemctl start nginx测试访问nginx的默认测试页:http://192.168.1.31.2、安装mysqlyum -y ins ansible一键部署 运维 自动化 服务器 nginx...
yum -y install pcre pcre-devel openssl openssl-devel tar xf /tmp/tengine-2.2.0.tar.gz -C /tmp cd /tmp/tengine-2.2.0 ./configure --prefix=/usr/local/nginx/ --with-http_realip_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module...
11、配置nginx role: # vim nginx/tasks/main.yml - name: install nginx yum: name={{item}} state=latest loop: - epel-release - nginx - name: install configuration file copy: src=nginx.conf dest=/etc/nginx/ owner=nginx group=nginx mode=0644validate="nginx -t -c %s" backup=yes ...