pixelart.platformsh-cli

Ansible Role: platform.sh CLI

Build Status

This role installs the platform.sh command-line tool on any Linux or UNIX system.

Requirements

  • You need to have php (version 5.5 or newer) installed and working.
  • You also need to have git installed and working.

Role Variables

Here are the available variables and their default values (check defaults/main.yml):

  • platformsh_path: /usr/local/bin/platform
    This sets the location where the platform.sh CLI will be installed. It should be in your user's $PATH so you can simply use platform to run commands instead of the full path.

  • platformsh_keep_updated: false
    Change this to true if you want to automatically update the platform.sh CLI to the latest version every time you run the playbook.

  • php_executable: php
    This is the name or path of the PHP executable. By default, it is set to php unless you change it.

  • platformsh_shell_config_path: ''
    Since the platform.sh CLI's shell configuration supports bash autocompletion, it can't go in /etc/profile.d. You need to specify a path where to put the file for global loading. For Ubuntu/Debian users, you can use /etc/bash.bashrc.d and add this to /etc/bash.bashrc:

    if [ -d /etc/bash.bashrc.d ]; then
      for i in /etc/bash.bashrc.d/*.sh; do
        if [ -r $i ]; then
          . $i
        fi
      done
      unset i
    fi 
    

Dependencies

No dependencies (just make sure PHP is installed).

Example Playbook

- hosts: phpdevs
  roles:
    - pixelart.platformsh-cli

Once the playbook runs, the platform tool will be installed in /usr/local/bin/platform (you can change this location) and will be available for normal user accounts.

Code of Conduct

This project follows a Contributor Code of Conduct. By participating in this project, you agree to follow its rules.

License

This project is licensed under MIT. See the LICENSE file for details.

Author Information

This role was created in 2017 by pixelart GmbH and is inspired by the work of Jeff Geerling, author of Ansible for DevOps.

Informazioni sul progetto

Installs the platform.sh CLI

Installa
ansible-galaxy install pixelart.platformsh-cli
Licenza
mit
Download
467
Proprietario
pixelart is a digital agency based in Salzburg that has won awards throughout Europe. We employ 60 specialists to provide a full range of digital services.