danbohea.platformsh-setup

Ansible 角色:Platform.sh 本地设置

构建状态

帮助在使用 Platform.sh CLI 时自动设置您的 Platform.sh 项目进行本地开发。

  • 配置无密码身份验证,使用您的 Platform.sh 用户 API 令牌。
  • 启用自动补全和 shell 别名。
  • 设置您的项目远程地址。
  • 构建您的项目(platform build)。

可选的 Drupal 特性:

  • 生成 drush 别名。
  • 将 drush 别名组名称重命名为更合理的名字(例如,不使用 Platform.sh 应用 ID)。

要求

角色变量

以下是所有角色的默认变量及其默认值。

# Platform.sh 用户
# ------------------------------------------------------------------------------

# Platform.sh 用户 API 令牌。
# 无密码身份验证所必需。

platformsh_token: null

# Platform.sh 应用
# ------------------------------------------------------------------------------

# 您创建 Platform.sh 项目时设置的应用 ID。

platformsh_app_id: xxxxxxxxxxxxx

# 用于识别您项目的简洁字符串。
# 将用作 drush 别名组名称。

platformsh_app_name: myapp

# 指示您的项目是否为 Drupal 网站。
# 决定是否设置 drush 别名。

platformsh_app_drupal: false

# 本地环境
# ------------------------------------------------------------------------------

# 访问 Platform.sh CLI 的用户

platformsh_user: vagrant

# Platform.sh CLI 二进制文件的安装位置(父目录)。

platformsh_install_dir: "/home/{{ platformsh_user }}/.composer/vendor/bin"

# Platform.sh CLI 的配置目录。

platformsh_config_dir: "/home/{{ platformsh_user }}/.platformsh"

# 您应用的根目录。

platformsh_app_root: /var/www/drupalvm

依赖关系

无。

示例剧本

- hosts: localhost
  connection: local

  roles:
    - pixelart.platformsh-cli
    - geerlingguy.drush
    - ansible-role-platformsh

许可证

MIT

作者信息

本角色由 Dan Bohea 创建。

关于项目

Automate project setup when using the Platform.sh CLI.

安装
ansible-galaxy install danbohea.platformsh-setup
许可证
Unknown
下载
118
拥有者