Ansible role to include custom YAML files from configured path(s).
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-include-vars

Ansible role to include custom YAML files from configured path(s).

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-include-vars.git
  name: feffi.macos-include-vars

Role Variables

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

macos_include_vars:
  # List of local paths to search for YAML files that will be included as Ansible vars.
  paths:
    - "{{ inventory_dir }}/.macos-boostrap"

  # Extension of files to include.
  extensions:
    - "yml"

  # Exclude files matching this names
  excludes:
    - "requirements.yml"

  # Directory depth to used search for files
  # 1 = only files directly in include_vars_dir_paths
  depth: 1

Dependencies

None.

Example Playbook

    - hosts: all
      vars:
        # Include custom vars from defined locations
        macos_include_vars: {
          paths: [
            "/Users/<USERNAME>/.macos-boostrap"
          ]
        }
      roles:
        - { role: feffi.macos-include-vars }