weareinteractive.unison

Ansible weareinteractive.unisonロール

ビルドステータス Galaxy GitHubタグ GitHubスター

weareinteractive.unisonAnsibleのロールで、以下を行います:

  • 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

貢献

正式なスタイルガイドはないので、既存のコーディングスタイルを維持してください。新しい機能や変更された機能については、ユニットテストと例を追加してください。

  1. フォークする
  2. フィーチャーブランチを作成(git checkout -b my-new-feature
  3. 変更をコミット(git commit -am '新しい機能を追加'
  4. ブランチにプッシュ(git push origin my-new-feature
  5. 新しいプルリクエストを作成

注意:README.mdファイルを更新するには、ansible-roleをインストールして実行してください:

$ gem install ansible-role
$ ansible-role docgen

ライセンス

著作権 (c) We Are Interactive MITライセンスの下。

プロジェクトについて

Installs and configures Unison

インストール
ansible-galaxy install weareinteractive.unison
ライセンス
mit
ダウンロード
310