Ansible role to manage personal dotfiles
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
defaults
meta
tasks
tests
.gitignore
.travis.yml
LICENSE
README.md

README.md

ansible-macos-dotfiles

Ansible role to manage personal dotfiles.

Build Status Github All Releases GitHub forks GitHub stars GitHub watchers Twitter Follow License

Requirements

  • Ansible 2.3

ansible.cfg

hash_behaviour = merge

Install

Just add the role to your requirements.yml file:

- src: https://github.com/feffi/ansible-macos-dotfiles.git
  name: feffi.macos-dotfiles

Role Variables

All role based variables are listed below, along with default values:

macos_dotfiles:
  # Containment directory for pulled git repositories
  containment: "{{ ansible_env.HOME + '/dotfiles' }}"
  # Git repositories to pull
  repositories:
    - { # Target name of the repository
        name: "dotfiles",
        # URL of the repository
        url: "https://github.com/feffi/dotfiles.git",
        # Symlinks to create from this repository, defaults to src= repo, dest= ~
        symlinks: [
          { file: "LICENSE" },
          { file: "README" },
          { file: "test-dir", force: yes, owner: root, group: admin, mode: "0777" }
        ]
      }

Dependencies

None.

Example Playbook

    - hosts: all
      vars:
        macos_dotfiles:
          # Containment directory for pulled git repositories
          containment: "{{ ansible_env.HOME + '/dotfiles' }}"
          # Git repositories to pull
          repositories:
            - { # Target name of the repository
                name: "dotfiles",
                # URL of the repository
                url: "https://github.com/feffi/dotfiles.git",
                # Symlinks to create from this repository, defaults to src= repo, dest= ~
                symlinks: [
                  { file: "LICENSE" },
                  { file: "README" },
                  { file: "test-dir", force: yes, owner: root, group: admin, mode: "0777" }
                ]
              }
      roles:
        - { role: feffi.macos-dotfiles }

Or with local parameters:

    - hosts: all
      roles:
        - { role: feffi.macos-dotfiles,
            macos_dotfiles: {
              # Containment directory for pulled git repositories
              containment: "{{ ansible_env.HOME + '/dotfiles' }}",
              # Git repositories to pull
              repositories: [
                { # Target name of the repository
                  name: "dotfiles",
                  # URL of the repository
                  url: "https://github.com/feffi/dotfiles.git",
                  # Symlinks to create from this repository, defaults to src= repo, dest= ~
                  symlinks: [
                    { file: "LICENSE" },
                    { file: "README" },
                    { file: "test-dir", force: yes, owner: root, group: admin, mode: "0777" }
                  ]
                }
              ]
            }
          }