inmotionhosting.wordpress_ultrastack
Ansible 角色:Wordpress UltraStack
模块化的 Ansible 角色,用于部署和配置 WordPress,采用 InMotion 优化的 UltraStack 配置。
要求
- CentOS 7.x 或更高版本
- Debian 9 或更高版本
- Ubuntu 16.04 LTS 或更高版本
依赖
必要依赖
- role: inmotionhosting.apache
- role: inmotionhosting.mysql
- role: inmotionhosting.php_fpm
- role: inmotionhosting.wordpress
- collection: community.general
- collection: ansible.posix
可选依赖
当 use_ultrastack: true
时需要以下角色:
- role: inmotionhosting.nginx_proxy
- role: inmotionhosting.redis
什么是 UltraStack?
UltraStack 是一套由 InMotion Hosting 技术团队创建的服务器配置,专注于特定内容管理系统的优化和性能。
包含了什么?
NGINX
NGINX 是 UltraStack 的一部分,作为反向代理和缓存大大加快您的网站请求。使用短 TTL 的页面缓存可以高效处理大量流量,并设置缓存规则以防止缓存已登录/已存储 Cookie 用户。
PHP-FPM
PHP-FPM(FastCGI 进程管理器)是传统 PHP 实现的替代方案。每个 PHP-FPM 池作为其自身完整的 PHP 实例,拥有自己的配置、限制和资源。
Redis
Redis(远程字典服务器的简称)为 SQL 和其他服务器进程提供对象缓存,并使用更快的系统内存,而不是使用服务器硬盘资源。这使得对常见数据库查询的强劲缓存成为可能,从而显著提高内容交付速度。
角色变量
可用变量及其默认值如下所示(您也可以查看 defaults/main.yml
):
变量 | 定义 |
---|---|
use_ultrastack | 默认为启用 UltraStack 配置。将其设置为 false 将阻止安装 Nginx 和 Redis。 |
use_redis | 启用/禁用 Redis 安装 |
site_domain | 与服务配置关联的域名。 |
ultrastack_w3tc_settings | 如果在 WordPress 上安装,配置其他 W3TC 设置。 |
nginx_ratelimit_enable | 启用 Nginx 限流配置 |
nginx_ratelimit_burst | Nginx 限流区域的突发设置 |
nginx_ratelimit_nodelay | 启用或禁用 Nginx 限流区域的延迟设置 |
nginx_ratelimit_zone | Nginx 限流区域的名称 |
nginx_ratelimit_paths | 限流的正则路径 |
nginx_cache_bypass_paths | 启用缓存旁路的正则路径 |
nginx_cache_purge_enable | 切换以启用位置块使用 ngx_cache_purge 模块清除缓存 |
nginx_vts_enable | 切换以启用 vts 模块的 NGINX 配置 |
nginx_cache_profile | 加载预配置的 NGINX 缓存配置文件 |
注意: 如果使用 UltraStack 优化,强烈建议使用 w3-total-cache
插件。
示例剧本
- hosts: wordpress_ultrastack
roles:
- role: inmotionhosting.apache
- role: inmotionhosting.mysql
- role: inmotionhosting.php_fpm
- role: inmotionhosting.wordpress
# nginx_proxy 和 redis 根据条件从
# wordpress_ultrastack 角色中包含
- role: inmotionhosting.wordpress_ultrastack
vars:
use_ultrastack: true
许可证
GPLv3
作者信息
关于项目
Modular Ansible Role for deploying and configuring WordPress, including InMotion's optimized UltraStack
安装
ansible-galaxy install inmotionhosting.wordpress_ultrastack
许可证
gpl-3.0
下载
12.3k
拥有者
Offering Private and Public Cloud, Software as a Service, and Web Hosting