cimon-io.asdf

ビルドステータス

Ansible ASDFロール

プラグイン付きで asdf バージョンマネージャをインストールするAnsibleロールです。

要件

特になし

ロール変数

使用できる変数は以下に示します。デフォルト値については defaults/main.yml を参照してください。asdf_plugins 変数はインストールするプラグインのリストを指定します:

asdf_plugins: []

各プラグインは次の形式で指定できます:

asdf_plugins:
  - name: "erlang"    # プラグイン名
    repository: ""    # プラグインリポジトリ(任意)
    versions:         # インストールするバージョンのリスト
      - 18.3
      - 20.1
    global: 20.1      # グローバルバージョンとして設定(任意)

asdf_user 変数は、このロールをインストールするユーザーを設定します:

asdf_user: "deploy"

デフォルトでは、このユーザーの ~/.asdfasdf とそのプラグインがインストールされます。この動作は asdf_dir を設定することで変更できます。これは、複数のユーザーがインストールされたプラグインやツールにアクセスする必要がある場合に便利です(例:デプロイユーザー、アプリユーザー、おそらく開発者ユーザー)。

asdf_dir: "/opt/asdf-vm"

asdf_legacy_version_file 変数は、他のバージョン管理ツールによって使用されるバージョンファイル(例:Rubyのrbenvの場合は .ruby-version)を読み込むプラグインのサポートを指定します。

asdf_legacy_version_file: "yes"

asdf_plugin_dependencies 変数は、プラグインに必要なパッケージを設定します(defaults/main.yml を参照):

asdf_plugin_dependencies: []

asdf_version 変数は、asdfのgitタグを設定します:

asdf_version: v0.9.0

依存関係

特になし

例プレイブック

以下にプレイブックの例を示します:

- hosts: web
  roles:
  - role: ansible-role-asdf
    asdf_plugins:
    - name: "erlang"
      versions: ["18.3", "20.1"]
      global: "20.1"
    - name: "elixir"
      versions: "1.3.1"

CentOSのためのより複雑な例は次の通りです:

- name: asdfをインストールする
  hosts: '*'
  become: true
  vars:
    asdf_version: v0.6.2
    asdf_user: ci
    asdf_plugins:
      - name: erlang
      - name: elixir
      - name: nodejs
        versions: ["8.11.3"]
        global: "8.11.3"
  roles:
    - asdf

developers グループがアクセスできる共有ディレクトリにasdfをインストールする例:

- name: asdfをインストールする
  hosts: '*'
  become: true
  vars:
    asdf_user: deploy
    asdf_group: developers
    asdf_dir: /opt/asdf-vm
    asdf_plugins:
      - name: erlang
      - name: elixir
      - name: nodejs
        versions: ["8.11.3"]
        global: "8.11.3"
  roles:
    - asdf

ライセンス

MITライセンスの下にライセンスされています。

プロジェクトについて

Install asdf (https://github.com/asdf-vm/asdf.git) and plugins

インストール
ansible-galaxy install cimon-io.asdf
ライセンス
Unknown
ダウンロード
26k
所有者
Continuous integration system with integrated staging server