Skip to content

Instantly share code, notes, and snippets.

@wate
Last active April 2, 2017 06:43
Show Gist options
  • Save wate/0ef54a4e5533b0050a1bf4b93b2db0e3 to your computer and use it in GitHub Desktop.
Save wate/0ef54a4e5533b0050a1bf4b93b2db0e3 to your computer and use it in GitHub Desktop.
[title]install "Unofficial" CLI client for the Sakura Cloud
---
# Usage
# ---------------------------------
#
# ```
# ansible -i 127.0.0.1, install_usacloud.yml -c local
# ```
#
- hosts: all
tasks:
- block:
- homebrew_tap:
name: sacloud/homebrew-usacloud
- homebrew:
name: usacloud
state: latest
when: ansible_os_family == 'Darwin'
become: false
- block:
- rpm_key:
key: https://usacloud.b.sakurastorage.jp/repos/GPG-KEY-usacloud
- yum_repository:
name: usacloud
description: usacloud
baseurl: https://usacloud.b.sakurastorage.jp/repos/centos/$basearch
gpgcheck: true
file: usacloud
- yum:
name: usacloud
state: latest
when: ansible_os_family == 'RedHat'
become: true
- block:
- apt_key:
url: https://usacloud.b.sakurastorage.jp/repos/GPG-KEY-usacloud
- apt_repository:
repo: deb https://usacloud.b.sakurastorage.jp/repos/debian /
filename: usacloud
- apt:
name: usacloud
update_cache: true
state: latest
when: ansible_os_family == 'Debian'
become: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment