chrismeyersfsu/provision_docker

default variables fail

Closed this issue · 1 comments

When running this playbook I get an error with not defining the provision docker inventory and group variables.

TASK [Ensure required vars are defined] ********************************************************************************* fatal: [localhost]: FAILED! => {"changed": false, "msg": "provision_docker_inventory_group or provision_docker_inventory is required"}

Here is what I have set in the defaults variables. Im not sure if how the variables should be set but I figured if I throw anything as a variable this check should work and then fail later down the playbook.
``
provision_docker_image_default: "centos/systemd"
provision_docker_ip: "127.0.0.1"
provision_docker_use_tls: true
provision_docker_state: "started"
provision_docker_inventory: "{{ inventory }}"
provision_docker_inventory_group: [net-dock]

Inventory file
`[net-docks]
docknode1 env=prod ansible_host=localhost ansible_port=2123
docknode2 env=prod ansible_host=localhost ansible_port=2123
docknode3 env=prod ansible_host=localhost ansible_port=2123

`I would like to point the variable to the inventroy file and the inventory_group variable to the group in the inventory file.

PEBCAK issue resolved :)