6

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
7

Updating the meta/main.yml according this snippet as follows:

dependencies:
  - src: 030.firewall
    version: 0.1.0
    name: 030.firewall
  - src: 030.sensu-client
    version: 0.4.1
    name: 030.sensu-client
  - src: geerlingguy.ntp
    version: 1.3.0
    name: geerlingguy.ntp    
  - src: geerlingguy.postfix
    version: 1.1.0
    name: geerlingguy.postfix
  - src: geerlingguy.redis
    version: 1.4.1
    name: geerlingguy.redis
  - src: Stouts.rabbitmq
    version: 1.2.1
    name: Stouts.rabbitmq

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.

2

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.

dependencies:
    - { role: 030.sensu-install }

should be ok.

  • reference to github.com/ansible/ansible/pull/14612 (+1). Issue persists when snippet { role: 030.sensu-install } is used. – 030 Sep 27 '16 at 8:20
  • 1
    Regarding I guess until the devs make up their minds you can ignore that warning. I do not want to ignore deprecation warnings, because these could cause huge issues in the future. – 030 Sep 27 '16 at 8:25
-1

if you are using private repo for galaxy then

meta\main.yml

---
# local copy
#dependencies:
#   - { role: '/roles/java', java_packages: java-1.8.0-openjdk }
#http
#dependencies:
#   - { role: 'git+http://gitlabserver/ansible-galaxy/java.git,master'}
#ssh
dependencies:
   - name: java
     src: ssh://git@gitlabserver/ansible-galaxy/java.git
     scm: git
     version: master

Note: you may need to have private key in the host for git clone

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.