• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

nginx-ansible: 采用ansible自动编译,安装,配置nginx

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

nginx-ansible

开源软件地址:

https://gitee.com/pippozq/nginx-ansible

开源软件介绍:

nginx-ansible

  1. 采用ansible自动编译,安装,配置nginx
  2. 动态生成configure.sh脚本
  3. 已测试nginx 1.12.2版本
  4. 支持增加新模块
  5. 支持centos7.x + , OpenSuse, Ubuntu

安装 nginx

  1. 下载nginx 版本到本地任意目录
  2. 更新vars/var_nginx.yml 文件中的{{download_path}},工程中files下已放有部分文件,可直接指定为此目录, configure命令添加模块,是采取读取config_list 列表信息,如果你需要增加或删减模块,可在此处更新。同时需要额外编译的模块,可以在role中进行增加,而后在install_nginx role的main.yml文件进行引用
---# versionnginx_version: 1.12.2                     # your nginx versionlibunwind_version: 1.1                    # mode versiongperftools_version: 2.2.1mod_strip_version: 0.1echo_nginx_module_version: 0.58#set_misc_nginx_module_version: 0.29# system                                      sys_user: rootsys_group: rootnginx_user: rootdownload_path: '/home/pippo/Downloads/nginx'      # local download pathdownload_dir: /tmp                                # remote download_dirinstall_dir: /opt                                 # install dir# nginx config list, add your new mod into listconfig_list:    - "--prefix={{install_dir}}/nginx-{{nginx_version}}"    - "--with-stream"    - "--with-http_realip_module"    - "--with-google_perftools_module"    - "--with-pcre"    - "--with-http_ssl_module"    - "--with-http_gzip_static_module"    - "--with-http_stub_status_module"    - "--add-module={{download_dir}}/temp/mod_strip-{{mod_strip_version}}"# nginx config path                  http_conf_path: "http_conf.d"                # for http tcp_conf_path: "tcp_conf.d"                  # for tcp  #nginx.configworker_processes: 8                           # nginx process# create pathcreate_path:    - "{{install_dir}}"    - "{{download_dir}}/temp"# firewall port  firewall_ports:    - "80"
  1. 更新hosts文件
[nginx]172.16.251.70
  1. 执行shell
ansible-playbook -i hosts nginx.yml

License

GNU General Public License v3.0


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap