Merge "Fix ansible warning group and host with same name"

This commit is contained in:
Zuul 2018-02-13 20:50:09 +00:00 committed by Gerrit Code Review
commit 130afa5400
2 changed files with 1 additions and 2 deletions

View File

@ -85,7 +85,6 @@
- name: Add undercloud vm to inventory
add_host:
name: undercloud
groups: undercloud
ansible_host: '{{ undercloud_ip }}'
ansible_fqdn: undercloud
ansible_user: '{{ undercloud_user }}'

View File

@ -25,7 +25,7 @@
# BEGIN Autogenerated groups
{% for group in groups %}
{% if group not in ['ungrouped', 'all'] %}
{% if group not in ['ungrouped', 'all'] and not (groups[group]|length == 1 and groups[group][0] == group) %}
[{{ group }}]
{% for host in groups[group] %}
{{ host }}