Close menu

Ansible Configuration Management Lookup Plugin

Easily retrieve configuration data used by Ansible Playbook from ConfigSeeder.

Ansible playbooks usually use a lot of configuration data:

  • URLs and IPs that need to be added to configuration files
  • Certificates and Private Keys that need to be copied to VMs

With the ConfigSeeder Ansible Lookup Plugin, we offer an easy way to use configuration data stored in ConfigSeeder® also in Ansible.

Why use Ansible configuration management data stored in ConfigSeeder®?

Compared with storing configuration data directly in ansible, using the ConfigSeeder Ansible Lookup Plugin has the following advantages:

  • While Ansible Vault is a secure way to store secrets directly in the ansible files, it is quite cumbersome to work with it. The values must be manually encrypted (and decrypted if an encrypted value has to be verified) and the key for the vault must be distributed manually if multiple administrators need to work with the key. Secrets retrieved from ConfigSeeder® are also stored encrypted, but can easily be managed using the Web UI.
  • Configuration data stored in the ansible files can only be used by Ansible playbooks. Configuration data stored in ConfigSeeder® can also be used for other purposes (access with clients, Kubernetes Connector, and/or OS Connector).
  • To see what configuration values are used by ansible, one normally has to look into the source control system storing the ansible files. With ConfigSeeder® ansible configuration management tool, the configuration data can easily be accessed with the Web UI.

Easy Integration with the ConfigSeeder Ansible Configuration Management Lookup Plugin

Compared with storing configuration data directly in ansible, using the ConfigSeeder Ansible Configuration management Lookup Plugin has the following advantages:

  1. Prepare Data in ConfigSeedereasy_ansible_integration_quickstart_configseeder
  2. Copy the Lookup Plugin to your Ansible installation
  3. Prepare the Ansible Playbook
    - name: Quickstart Playbook
    hosts: localhost
    tasks:
    - name: ConfigSeeder Lookup Value with default filter
    debug: msg={{ lookup('configseeder', 'my.example.key') }}
    - name: ConfigSeeder Lookup Value for environment PROD
    debug: msg={{ lookup('configseeder', 'my.example.key', environmentKey='PROD') }}
    - name: ConfigSeeder Lookup Value for environment TEST and context 'context'
    debug: msg={{ lookup('configseeder', 'my.example.key', environmentKey='TEST', context='context') }}
  4. Create an API Key with access permission to the Environments TEST and PROD and Configuration Group ansible-quickstart
  5. Run Ansible
    CONFIGSEEDER_URL= \
    CONFIGSEEDER_CONFIGURATIONGROUPKEYS=ansible-quickstart \
    CONFIGSEEDER_TENANTKEY=default \
    CONFIGSEEDER_ENVIRONMENTKEY=TEST \
    CONFIGSEEDER_APIKEY= \
    \
    ansible-playbook playbook.yaml

Get Started

For an easy Ansible integration get our Ansible configuration management tool from our Download site and have a look at the plugin documentation. See https://docs.ansible.com/ansible/latest/plugins/lookup.html for general information about ansible lookup plugins.