weareinteractive.unison
Ansible weareinteractive.unisonロール
weareinteractive.unison
はAnsibleのロールで、以下を行います:
- unisonをインストールする
- unisonを設定する
注意:
Ansible Galaxyは現在組織をサポートしているため、このロールは
franklinkim.unison
からweareinteractive.unison
に移動しました!
インストール
ansible-galaxy
を使用する場合:
$ ansible-galaxy install weareinteractive.unison
requirements.yml
を使用する場合:
- src: weareinteractive.unison
git
を使用する場合:
$ git clone https://github.com/weareinteractive/ansible-unison.git weareinteractive.unison
依存関係
- Ansible >= 2.0
変数
このロールのデフォルト変数のリストは、defaults/main.yml
にもあります。
---
# unison_configs:
# - name: sync1
# # 同期する2つのルートディレクトリ。
# src: /home/unison
# dest: ssh://dev.null/home/unison
# # ユーザー入力なしでUnisonを実行したい場合は、「batch」モードを試してください。
# batch: yes
# # プロンプトなしで、Unisonの推奨を受け入れる場合:
# auto: yes
# # 必要に応じて、特定のサブディレクトリのみ(ルートの下)を同期できます。
# paths: []
# # 正規表現で一致する特定のファイルやディレクトリを無視することができます。
# ignore: []
# # ファイルのプロパティの違いを無視したい場合:
# perms: 0
#
# 設定のリスト
unison_configs: []
# unisonのユーザー名(文字列 | false)
unison_user: unison
# 設定のパス
unison_config_path: "/home/{{ unison_user }}/.unison"
# パッケージ名(バージョン)
unison_package: unison
使用法
以下は例のプレイブックです:
---
- hosts: all
# Docker内でテストを実行するための依存関係をインストールするためのpre_tasks
pre_tasks:
- name: opensshをインストール
action: "{{ ansible_pkg_mgr }} pkg=openssh-client state=present"
roles:
- weareinteractive.unison
vars:
unison_configs:
- name: sync
src: /home/unison
dest: ssh://dev.nul/home/unison
ignore:
- ".*"
- "~*"
テスト
$ git clone https://github.com/weareinteractive/ansible-unison.git
$ cd ansible-unison
$ vagrant up
貢献
正式なスタイルガイドはないので、既存のコーディングスタイルを維持してください。新しい機能や変更された機能については、ユニットテストと例を追加してください。
- フォークする
- フィーチャーブランチを作成(
git checkout -b my-new-feature
) - 変更をコミット(
git commit -am '新しい機能を追加'
) - ブランチにプッシュ(
git push origin my-new-feature
) - 新しいプルリクエストを作成
注意:README.md
ファイルを更新するには、ansible-role
をインストールして実行してください:
$ gem install ansible-role
$ ansible-role docgen
ライセンス
著作権 (c) We Are Interactive MITライセンスの下。
インストール
ansible-galaxy install weareinteractive.unison
ライセンス
mit
ダウンロード
310