weareinteractive.unison

Ansible weareinteractive.unison Role

Build Status Galaxy GitHub Tags GitHub Stars

weareinteractive.unison is an Ansible role that:

  • Installs Unison
  • Configures Unison

Note:

The role has been moved from franklinkim.unison to weareinteractive.unison because Ansible Galaxy now supports organizations.

Installation

To install using ansible-galaxy:

$ ansible-galaxy install weareinteractive.unison

To install using requirements.yml:

- src: weareinteractive.unison

To install using git:

$ git clone https://github.com/weareinteractive/ansible-unison.git weareinteractive.unison

Dependencies

  • Ansible version 2.0 or higher

Variables

Here are the default variables for this role, available in defaults/main.yml:

---
# unison_configs:
#   - name: sync1
#     src: /home/unison  # Source directory to sync
#     dest: ssh://dev.null/home/unison  # Destination directory to sync
#     batch: yes  # Run Unison in batch mode, no user input needed
#     auto: yes  # Automatically accept Unison's recommendations
#     paths: []  # Specific subdirectories to sync (optional)
#     ignore: []  # Files or directories to ignore (optional)
#     perms: 0  # Ignore differences in file properties
#

# List of Unison configurations
unison_configs: []
# Username for Unison (string | false)
unison_user: unison
# Path to Unison configurations
unison_config_path: "/home/{{ unison_user }}/.unison"
# Package name (version)
unison_package: unison

Usage

Here's an example playbook:

---

- hosts: all
  # Pre-tasks for installing dependencies for running tests in Docker
  pre_tasks:
    - name: Installing 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:
          - ".*"
          - "~*"

Testing

To test, run the following commands:

$ git clone https://github.com/weareinteractive/ansible-unison.git
$ cd ansible-unison
$ vagrant up

Contributing

To contribute, please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Note: To update the README.md file, install and run ansible-role:

$ gem install ansible-role
$ ansible-role docgen

License

Copyright (c) We Are Interactive under the MIT license.

Informazioni sul progetto

Installs and configures Unison

Installa
ansible-galaxy install weareinteractive.unison
Licenza
mit
Download
310
Proprietario