feat(platform-cli): add Platform.sh CLI

Fixes: #27
This commit is contained in:
Oliver Davies 2022-04-07 12:08:00 +01:00
parent 57f5cabf80
commit 68be4d521d
2 changed files with 31 additions and 0 deletions

View file

@ -16,6 +16,7 @@
- role: neovim
- role: neovim-lsp
- role: npm
- role: platformsh-cli
- role: pv
- role: ripgrep
- role: starship-prompt

View file

@ -0,0 +1,30 @@
---
- name: Install dependencies
ansible.builtin.package:
name:
- php
state: latest
become: true
- name: Existing install
stat:
path: "{{ ansible_user_dir }}/.platformsh/bin/platform"
register: install
- name: Download installer
ansible.builtin.get_url:
dest: /tmp/platformsh-install.sh
mode: 0755
url: https://platform.sh/cli/installer
become: true
when: not install.stat.exists
- name: Execute installer
ansible.builtin.command: php /tmp/platformsh-install.sh
when: not install.stat.exists
- name: Remove platformsh-install.sh
ansible.builtin.file:
path: /tmp/platformsh-install.sh
state: absent
become: true