问题原文
原帖链接 · 030 · CC BY-SA 3.0
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
已采纳解答
原帖链接 · 030 · CC BY-SA 4.0
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.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
