damianlewis.octobercms
Ansible 角色: October CMS
用于安装和配置 October CMS 的角色。
要求
无。
角色变量
可用的变量如下所列,并包含其默认值。
octobercms_deploy: no
octobercms_deploy_repo: ''
octobercms_deploy_version: master
octobercms_deploy_depth: 0
octobercms_deploy_path: /var/www/octobercms
octobercms_deploy_deployment_key_path: ~/.ssh/id_octobercms_deployment
从 Git 仓库部署现有的 October CMS 应用。
octobercms_deploy:boolean
- 将此设置为 true,并将octobercms_build_from_installer
和octobercms_build_from_composer
设置为 false,以从 Git 仓库克隆。octobercms_deploy_repo:string
- 指定仓库的 URL。octobercms_deploy_version:string
- 指定要安装的版本,可以是分支或标签名称。octobercms_deploy_depth:int
- 指定克隆仓库时要截断的修订次数。值为0
表示下载所有修订。octobercms_deploy_path:string
- 指定仓库将被克隆到的位置。octobercms_deploy_deployment_key_path:string
- 指定 SSH Git 部署密钥的路径。在使用私有仓库时需要。
octobercms_build_from_installer: yes
octobercms_installer_path: "{{ octobercms_deploy_path }}"
使用本地安装程序安装 October。
octobercms_build_from_installer:boolean
- 将其设置为 true,并将octobercms_build_from_composer
设置为 false,以使用本地安装程序安装。octobercms_installer_path:string
- 指定 October 将被安装的位置。
octobercms_build_from_composer: no
octobercms_composer_project_path: "{{ octobercms_deploy_path }}"
octobercms_composer_install: no
octobercms_composer_no_dev: yes
使用 Composer 安装 October。
octobercms_build_from_composer:boolean
- 将其设置为 true,并将octobercms_build_from_installer
设置为 false,以使用 Composer 安装。octobercms_composer_project_path:string
- 指定 October 将被安装的位置。octobercms_composer_install:boolean
- 指定安装后是否应运行composer install
。octobercms_composer_no_dev:boolean
- 指定是否应禁用所需开发包的安装。
octobercms_root_path: "{{ octobercms_deploy_path }}"
octobercms_owner: "{{ ansible_ssh_user }}"
配置设置。
octobercms_root_path:string
- 指定 October 将被安装的位置。octobercms_owner:string
- 指定将拥有 October 安装的用户。
octobercms_app_debug: yes
octobercms_app_environment: production
octobercms_app_name: October CMS
octobercms_app_url: http://localhost
octobercms_app_key: ''
octobercms_app_timezone: UTC
应用程序配置的可选设置。
octobercms_app_debug:boolean
- 指定是否启用调试模式。octobercms_app_environment:string
- 指定应用程序环境。octobercms_app_name:string
- 指定应用程序的名称。octobercms_app_url:string
- 指定应用程序使用的基础 URL。octobercms_app_key:string
- 指定应用程序应使用的加密密钥。octobercms_app_timezone:string
- 指定应用程序时区。强烈建议将其设置为 UTC(因为服务器和数据库时区也应如此),而使用octobercms_cms_backend_timezone
设置后端显示日期和时间的默认时区。
octobercms_cms_edge_updates: no
octobercms_cms_disable_core_updates: "{{ octobercms_build_from_composer | default(no) }}"
octobercms_cms_enable_routes_cache: no
octobercms_cms_enable_assets_cache: no
octobercms_cms_database_templates: no
octobercms_cms_enable_csrf: yes
octobercms_cms_active_theme: demo
octobercms_cms_backend_uri: backend
octobercms_cms_backend_timezone: UTC
配置 October 的可选设置。
octobercms_cms_edge_updates:boolean
- 将此设置为 true,以下载和使用核心文件和插件的开发版。octobercms_cms_disable_core_updates:boolean
- 将此设置为 true,以禁用通过 October 网关发送的核心更新。octobercms_cms_enable_routes_cache:boolean
- 指定是否启用路由缓存。建议在开发时禁用,在生产模式下启用。octobercms_cms_enable_assets_cache:boolean
- 指定是否启用资产缓存。建议在开发时禁用,在生产模式下启用。octobercms_cms_database_templates:boolean
- 指定主题模板是否存储在数据库中而不是文件系统中。octobercms_cms_enable_csrf:boolean
- 指定是否启用跨站请求伪造(CSRF)保护。octobercms_cms_active_theme:string
- 指定默认的 CMS 主题。octobercms_cms_backend_uri:string
- 指定用于访问后端页面的 URL 名称。octobercms_cms_backend_timezone:string
- 指定后端用户的默认时区设置。
octobercms_database_connection: mysql
octobercms_database_name: 'database' 或 MySQL、PostgreSQL 和 SQL Server / 'storage/database.sqlite' 用于 SQLite
octobercms_database_prefix: ''
用于配置与 October 一起使用的数据库的设置。
octobercms_database_connection:string
- 指定要使用的数据库连接。可能的选项有sqlite
、mysql
、pgsql
和sqlsrv
。octobercms_database_name:string
- 指定数据库名称。octobercms_database_prefix:string
- 指定添加到数据库表名中的前缀。
octobercms_database_host: localhost
octobercms_database_port: 3306 用于 MySQL / 5432 用于 PostgreSQL / 1433 用于 SQL Server
octobercms_database_user: root
octobercms_database_password: ''
用于配置数据库的附加设置。(MySQL、PostgreSQL 和 SQL Server)
octobercms_database_host:string
- 指定数据库所在的主机。octobercms_database_port:int
- 指定访问数据库的端口。octobercms_database_user:string
- 指定数据库用户。octobercms_database_password:string
- 指定数据库用户密码。
octobercms_database_charset: 'utf8mb4' 用于 MySQL / 'utf8' 用于 PostgreSQL
用于配置数据库的附加设置。(MySQL、PostgreSQL)
octobercms_database_charset:string
- 指定数据库的字符集。
octobercms_database_collation: utf8mb4_unicode_ci
用于配置数据库的附加设置。(MySQL)
octobercms_database_collation:string
- 指定数据库使用的排序规则。
octobercms_database_schema: public
用于配置数据库的附加设置。(PostgreSQL)
octobercms_database_schema:string
- 指定数据库使用的模式。
octobercms_use_dotenv_config: no
octobercms_use_config_for_testing: no
octobercms_create_public_directory: no
其他 October 设置。
octobercms_use_dotenv_config:boolean
- 将此设置为 true,以将基础配置转换为 DotEnv 文件。octobercms_use_config_for_testing:boolean
- 将此设置为 true,以使用单独的数据库进行测试。有关配置测试环境,请参见 环境配置。octobercms_create_public_directory:boolean
- 将此设置为 true,以创建所需的公共文件的镜像副本,以提供应用程序。请参见 使用公共文件夹。
octobercms_artisan_plugins: []
octobercms_artisan_plugins_extra: []
使用 Artisan 安装市场插件。
octobercms_artisan_plugins:list
- 指定要安装的插件列表,格式为AuthorName.PluginName
。octobercms_artisan_plugins_extra:list
- 指定要安装的额外插件列表,格式为AuthorName.PluginName
。
octobercms_plugins_path: "{{ octobercms_deploy_path }}/plugins"
octobercms_git_plugins: []
octobercms_git_plugins_extra: []
使用 Git 安装插件。
octobercms_plugins_path:string
- 指定 October 插件文件夹。octobercms_git_plugins:list
- 指定要使用 Git 安装的插件列表。octobercms_git_plugins_extra:list
- 指定要使用 Git 安装的额外插件列表。
以下参数是必需的:
repo:string
- 指定仓库的 URL。path:string
- 指定仓库要克隆到的位置。
以下参数是可选的:
version:string
- 指定要安装的版本,可以是分支或标签名称。默认为主分支。depth:int
- 指定克隆仓库时要截断的修订次数。默认为 1。
依赖
无。
示例剧本
- hosts: server
become: yes
vars:
octobercms_owner: www-data
octobercms_app_debug: no
octobercms_app_url: https://example.com
octobercms_database_name: octobercms
octobercms_database_user: octobercms_user
octobercms_database_password: secret
tasks:
- import_role:
name: damianlewis.octobercms
许可证
MIT
作者
Damian Lewis
安装
ansible-galaxy install damianlewis.octobercms
许可证
Unknown
下载
107
拥有者