Closed veger closed 8 years ago
The dependencies are disabled when set to false: https://github.com/Graylog2/graylog-ansible-role/blob/466d51f61657586a5e4ce04b2bb7267135855e2b/meta/main.yml#L4
Maybe sharing the error you get could be helpful?
I saw that change (the galaxy install, is slightly different, but functionally the same), but it does not disable the dependency requirement:
$ ansible-playbook playbook.yml
ERROR! the role 'lesmyrmidons.mongodb' was not found in /path/to/ansible/roles
The error appears to have been in '/path/to/ansible/roles/Graylog2.graylog-ansible-role/meta/main.yml': line 3, column 5, but may be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
dependencies:
- { role: lesmyrmidons.mongodb, when: graylog_install_mongodb }
^ here
(Ansible 2.2)
Removing the dependencies from meta/main.yml
(obviously) 'fixes' the issue.
After looking into the Ansible docs and some old issues, it looks like this is the expected behaviour. The when
statement replaces the action with a noop
but the validation if the role exist or not happens before that. So you need to download all dependencies in any case or at least create empty directories like mkdir roles/lesmyrmidons.mongodb
... to make Ansible happy. If this is not what you expect please open an issue directly in the Ansible repository: https://github.com/ansible/ansible
I get an error that the depend roles (ES, MongoDB, nginx) are not installed, even when I disable those functionalities using:
I would expect that by disabling them, the dependent roles do not have to be installed?