Skip to content
master
Go to file
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Nov 11, 2018
Sep 10, 2017
Nov 27, 2017

README.md

ansible-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-include-vars.git
  name: ansible-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 }}/.secrets"

  # 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>/.secrets"
          ]
        }
      roles:
        - { role: ansible-include-vars }

About

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

Topics

Resources

License

Packages

No packages published
You can’t perform that action at this time.