-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
Attempting to set values for ceph-grafana and ceph-prometheus (all?) roles seems to be thwarted by the merge_vars.yml task.
ansible-playbook -v \
-e '{"prometheus":{"container_name":"docker-hub.example.com:5000/openshift3/prometheus", "version":"latest"}}' \
-e '{"grafana":{"container_name":"docker-hub.example.com:5000/rhceph/rhceph-3-dashboard-rhel7", "version":"latest"}}' \
/usr/share/cephmetrics-ansible/playbook.yml
...
TASK [ceph-prometheus : Create prometheus data directory] ***********************************************************************************************************
fatal: [ceph-admin]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'user_id'\n\nThe error appears to have been in '/usr/share/cephmetrics-ansible/roles/ceph-prometheus/tasks/main.yml': line 14, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Create prometheus data directory\n ^ here\n"}If the values instead are placed in roles/ceph-{grafana,prometheus}/defaults/main.yml and run like this it will work:
ansible-playbook -v \
/usr/share/cephmetrics-ansible/playbook.ymlThis of course defeats the purpose of ansible variables however. I shouldn't have to modify the content of the playbook to run it. I'm not sure why merge_vars.yml even exists really, but it seems to have a logic problem.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels