CyVerse-Ansible.unixodbc-cfg

unixodbc-cfg

============

Build Status Ansible Galaxy

This Ansible role helps manage the configuration files for unixODBC. Currently, it can set up user .odbc.ini files. In the future, it will also manage system odbc.ini and odbcinst.ini files.

Requirements


None

Role Variables


These are the variables available for this role. None are mandatory.

Variable Default Description
unixodbc_cfg_defer false Decide if execution should be delayed. See below.
unixodbc_cfg_group unixodbc_cfg_user The group for which the .odbc.ini will be created.
unixodbc_cfg_odbcini_path /home/unixodbc_cfg_user The directory where the .odbc.ini file will be stored.
unixodbc_cfg_sources [] A list of data source definitions. See below.
unixodbc_cfg_user ansible_user The user for whom the .odbc.ini will be generated.

If unixodbc_cfg_defer is set to true, the role will not make any changes when it runs main.yml. This feature helps in managing dependencies between roles.

Each item in the unixodbc_cfg_sources list has the following fields:

Field Required Default Description
driver_file yes Name of the driver file for the data source.
driver_properties no {} Properties for the data source driver.
source_name yes Name of the data source.
tracefile no null File for tracing. If omitted, null, or empty, no trace will be recorded.

Dependencies


None

Example Playbook


Here’s an example of running the role from a play:

- hosts: servers
  roles:
    - role: cyverse-ansible.unixodbc-cfg
      vars:
        unixodbc_cfg_sources:
          - source_name: postgres
            driver_file: /usr/pgsql-9.3/lib/psqlodbc.so
            driver_properties:
              CommLog: 0
              Database: ICAT
              Debug: 0
              Ksqo: 0
              Port: "{{ dbms_port }}"
              ReadOnly: no
              Servername: "{{ dbms_host }}"

Here’s an example of running the role’s odbc.yml tasks using include_role:

- include_role:
    name: cyverse-ansible.unixodbc-cfg
    tasks_from: odbc.yml
  vars:
    unixodbc_cfg_odbcini_path: /var/lib/irods
    unixodbc_cfg_user: "{{ service_account_name }}"
    unixodbc_cfg_sources:
      - source_name: postgres
        driver_file: /usr/pgsql-9.3/lib/psqlodbc.so
        driver_properties:
          CommLog: 0
          Database: "{{ db_name }}"
          Debug: 0
          Ksqo: 0
          Port: "{{ dbms_port }}"
          ReadOnly: no
          Servername: "{{ dbms_host }}"

License


See license.

Author Information


Tony Edgin
tedgin@cyverse.org
CyVerse

Informazioni sul progetto

an ansible role for configuring user .odbc.ini files

Installa
ansible-galaxy install CyVerse-Ansible.unixodbc-cfg
Licenza
other
Download
2.2k
Proprietario