StackFocus.postmaster

PostMaster Ansible 角色

这是一个 Ansible 角色,用于部署由 StackFocus 编写的 web 应用程序 PostMaster

需求

此角色需要 geerlingguy.mysql Ansible 角色的 2.4.2 版本。 如果您通过 Ansible Galaxy 安装此角色,geerlingguy.mysql 应该会自动安装。 请注意,只有当变量 postmaster_install_mysql 设置为 True 时,才会使用 geerlingguy.mysql 角色。

此角色必须以 sudo 或 root 身份运行,否则角色将失败。

角色变量:

  • postmaster_db_user - PostMaster 连接使用的 MySQL 用户。
  • postmaster_db_password - MySQL 用户的密码。
  • postmaster_db_host - MySQL 服务器的主机名或 IP 地址,默认为 localhost
  • postmaster_db_port - MySQL 服务器侦听的端口,默认为 3306
  • postmaster_db_name - MySQL 数据库的名称,默认为 servermail
  • postmaster_secret_key - PostMaster 使用的 Flask 秘钥(这应该是随机字符串)。
  • postmaster_migrate_db - 确定是否迁移/升级 PostMaster 数据库,默认为 True
  • postmaster_install_mysql - 确定是否使用 geerlingguy.mysql 角色安装 MySQL。请查看该角色的文档以了解 MySQL 所需的配置选项,默认为 False
  • postmaster_apache_vhost_extra_settings - 允许提供应用于 PostMaster 虚拟主机的 Apache 设置的多行字符串,默认未设置。
  • postmaster_apache_port - PostMaster 虚拟主机侦听的端口。
  • postmaster_apache_ssl_cert - 目标节点上 PostMaster 虚拟主机使用的 SSL 证书的路径。如果未设置,虚拟主机将不使用 SSL。
  • postmaster_apache_ssl_key - 目标节点上 PostMaster 虚拟主机使用的 SSL 密钥的路径。如果未设置,虚拟主机将不使用 SSL。
  • postmaster_apache_ssl_chain - 目标节点上 PostMaster 虚拟主机使用的 SSL 证书链的路径。配置 SSL 时不是必需的,但如果定义了 postmaster_apache_ssl_local_chain,则是必需的。
  • postmaster_apache_ssl_local_cert - 本地路径,复制到 postmaster_apache_ssl_cert 中定义的路径的 SSL 证书。这不是必需的。
  • postmaster_apache_ssl_local_key - 本地路径,复制到 postmaster_apache_ssl_key 中定义的路径的 SSL 密钥。这不是必需的。
  • postmaster_apache_ssl_local_chain - 本地路径,复制到 postmaster_apache_ssl_chain 中定义的路径的 SSL 证书链。这不是必需的。
  • postmaster_apache_ssl_cipher_suite - PostMaster 虚拟主机允许的 SSL 密码套件,默认为 AES256+EECDH:AES256+EDH
  • postmaster_apache_ssl_protocol - PostMaster 虚拟主机允许的 SSL 协议,默认为 All -SSLv2 -SSLv3
  • postmaster_clean_virtualenv - 删除并重新创建 PostMaster 虚拟环境。这在升级之间很有用,可以删除旧的、不再使用的 Python 依赖项,默认为 False

Playbook 示例:

- name: 部署 PostMaster
  hosts: mailserver
  become: yes

  vars:
  - postmaster_db_user: postmaster_user
  - postmaster_db_password: DbUserPassword
  - postmaster_db_host: localhost
  - postmaster_db_name: servermail
  - postmaster_migrate_db: True
  - postmaster_secret_key: SuperSecretKey
  - postmaster_apache_port: 8443
  - postmaster_apache_ssl_cert: /local/path/to/postmaster.crt
  - postmaster_apache_ssl_key: /local/path/to/postmaster.key
  - postmaster_install_mysql: True
  - mysql_root_password: MySqlRootPassword
  - mysql_enabled_on_startup: yes
  - mysql_databases:
    - name: "{{ postmaster_db_name }}"
  - mysql_users:
    - name: "{{ postmaster_db_user }}"
      password: "{{ postmaster_db_password }}"
      host: localhost
      priv: "{{ postmaster_db_name }}.*:ALL"

  roles:
   - postmaster
关于项目

PostMaster for Ubuntu

安装
ansible-galaxy install StackFocus.postmaster
许可证
Unknown
下载
30.4k
拥有者