MNAIO: Remove duplicated vm_servers group creation

This play is duplicated, so we remove the second execution
and ensure that the first uses a local connection.

Change-Id: I6162e93c999a792cbcdc42bf605271b999327e08
This commit is contained in:
Jesse Pretorius 2018-10-17 11:30:54 +01:00
parent 2614846180
commit bff190f00f
2 changed files with 2 additions and 18 deletions

View File

@ -224,23 +224,6 @@
import_playbook: vm-status.yml
- name: Create vm_servers group
hosts: localhost
connection: local
gather_facts: false
environment: "{{ deployment_environment_variables | default({}) }}"
tags:
- deploy-vms
tasks:
- name: VM Servers group
add_host:
name: "{{ item }}"
groups: vm_servers
when:
- hostvars[item]['server_vm'] | default(false) | bool
with_items: "{{ groups['pxe_servers'] }}"
- name: VM Host Setup
hosts: vm_servers
gather_facts: false

View File

@ -15,6 +15,7 @@
- name: Create vm_servers group
hosts: localhost
connection: local
gather_facts: false
tasks:
- name: VM Servers group
@ -22,7 +23,7 @@
name: "{{ item }}"
groups: vm_servers
when:
- hostvars[item]['server_vm'] | default(false) | bool
- (hostvars[item]['server_vm'] | default(false)) | bool
with_items: "{{ groups['pxe_servers'] }}"
- name: VM Status