meta/main.yml
dependencies:
- { role: 030.sensu-install }
results in:
[DEPRECATION WARNING]: The comma separated role spec format, use the
yaml/explicit format instead..
This feature will be removed in a future release.
Deprecation warnings can be disabled by setting deprecation_warnings=False in
ansible.cfg.
when sudo ansible-galaxy install -r requirements/development.yml
is issued.
Attempts to solve the issue
When
dependencies:
- role: 030.sensu-install
version: 0.1.0
is defined, the syntax check succeeds, but the deprecation warning persists.
When
dependencies:
- src: 030.sensu-install
version: 0.1.0
is defined, sudo ansible-galaxy install -r requirements/development.yml
is run the deprecation warning is solved, but ansible-playbook /etc/ansible/roles/role_under_test/tests/${playbook} --syntax-check
results in:
ERROR! role definitions must contain a role name
Updating the meta/main.yml according this snippet as follows:
and installing the requirements by issuing
ansible-galaxy install -r requirements/development.yml
did not return the[DEPRECATION WARNING]: The comma separated role spec format
issue anymore.There is open bugfix pull request on github regarding this issue but its still unclear if its a bug or you should use src: instead, check the discussion.
https://github.com/ansible/ansible/pull/14612
I guess until the devs make up their minds you can ignore that warning. Moreover you are not really using comma separated syntax, so this warning should not appear in my opinion.
should be ok.
if you are using private repo for galaxy then
meta\main.yml
Note: you may need to have private key in the host for git clone