From c05a7add5fd4b65ec9e4223b9d7fb729bff3e427 Mon Sep 17 00:00:00 2001 From: jctanner Date: Thu, 12 Oct 2017 10:20:33 -0400 Subject: [PATCH] Only install pyvmomi if user is root (#31628) --- test/integration/targets/vmware_cluster/tasks/main.yml | 1 + test/integration/targets/vmware_datacenter/tasks/main.yml | 1 + test/integration/targets/vmware_dvswitch/tasks/main.yml | 1 + test/integration/targets/vmware_guest_facts/tasks/main.yml | 1 + test/integration/targets/vmware_guest_find/tasks/main.yml | 1 + test/integration/targets/vmware_guest_tools_wait/tasks/main.yml | 1 + test/integration/targets/vmware_host/tasks/main.yml | 1 + test/integration/targets/vmware_maintenancemode/tasks/main.yml | 1 + test/integration/targets/vmware_resource_pool/tasks/main.yml | 1 + test/integration/targets/vmware_vm_facts/tasks/main.yml | 1 + test/integration/targets/vmware_vswitch/tasks/main.yml | 1 + 11 files changed, 11 insertions(+) diff --git a/test/integration/targets/vmware_cluster/tasks/main.yml b/test/integration/targets/vmware_cluster/tasks/main.yml index ac7b4307b1..e8747c1632 100644 --- a/test/integration/targets/vmware_cluster/tasks/main.yml +++ b/test/integration/targets/vmware_cluster/tasks/main.yml @@ -20,6 +20,7 @@ pip: name: pyvmomi state: latest + when: "{{ ansible_user_id == 'root' }}" - name: store the vcenter container ip set_fact: diff --git a/test/integration/targets/vmware_datacenter/tasks/main.yml b/test/integration/targets/vmware_datacenter/tasks/main.yml index 4890c7cd3a..90a47084fd 100644 --- a/test/integration/targets/vmware_datacenter/tasks/main.yml +++ b/test/integration/targets/vmware_datacenter/tasks/main.yml @@ -20,6 +20,7 @@ pip: name: pyvmomi state: latest + when: "{{ ansible_user_id == 'root' }}" - name: store the vcenter container ip set_fact: diff --git a/test/integration/targets/vmware_dvswitch/tasks/main.yml b/test/integration/targets/vmware_dvswitch/tasks/main.yml index 0058c8c589..92a9fb789e 100644 --- a/test/integration/targets/vmware_dvswitch/tasks/main.yml +++ b/test/integration/targets/vmware_dvswitch/tasks/main.yml @@ -20,6 +20,7 @@ pip: name: pyvmomi state: latest + when: "{{ ansible_user_id == 'root' }}" - name: store the vcenter container ip set_fact: diff --git a/test/integration/targets/vmware_guest_facts/tasks/main.yml b/test/integration/targets/vmware_guest_facts/tasks/main.yml index 22196a7a90..3e533faa16 100644 --- a/test/integration/targets/vmware_guest_facts/tasks/main.yml +++ b/test/integration/targets/vmware_guest_facts/tasks/main.yml @@ -20,6 +20,7 @@ pip: name: pyvmomi state: latest + when: "{{ ansible_user_id == 'root' }}" - name: store the vcenter container ip set_fact: diff --git a/test/integration/targets/vmware_guest_find/tasks/main.yml b/test/integration/targets/vmware_guest_find/tasks/main.yml index e89483f000..70dad2ae50 100644 --- a/test/integration/targets/vmware_guest_find/tasks/main.yml +++ b/test/integration/targets/vmware_guest_find/tasks/main.yml @@ -6,6 +6,7 @@ pip: name: pyvmomi state: latest + when: "{{ ansible_user_id == 'root' }}" - name: store the vcenter container ip set_fact: diff --git a/test/integration/targets/vmware_guest_tools_wait/tasks/main.yml b/test/integration/targets/vmware_guest_tools_wait/tasks/main.yml index 05b46c89e0..7c56449a07 100644 --- a/test/integration/targets/vmware_guest_tools_wait/tasks/main.yml +++ b/test/integration/targets/vmware_guest_tools_wait/tasks/main.yml @@ -7,6 +7,7 @@ pip: name: pyvmomi state: latest + when: "{{ ansible_user_id == 'root' }}" - name: store the vcenter container ip set_fact: diff --git a/test/integration/targets/vmware_host/tasks/main.yml b/test/integration/targets/vmware_host/tasks/main.yml index db8456d5ba..59a71789df 100644 --- a/test/integration/targets/vmware_host/tasks/main.yml +++ b/test/integration/targets/vmware_host/tasks/main.yml @@ -20,6 +20,7 @@ pip: name: pyvmomi state: latest + when: "{{ ansible_user_id == 'root' }}" - name: store the vcenter container ip set_fact: diff --git a/test/integration/targets/vmware_maintenancemode/tasks/main.yml b/test/integration/targets/vmware_maintenancemode/tasks/main.yml index f369fa0da1..efad17e4e4 100644 --- a/test/integration/targets/vmware_maintenancemode/tasks/main.yml +++ b/test/integration/targets/vmware_maintenancemode/tasks/main.yml @@ -7,6 +7,7 @@ pip: name: pyvmomi state: latest + when: "{{ ansible_user_id == 'root' }}" - name: store the vcenter container ip set_fact: diff --git a/test/integration/targets/vmware_resource_pool/tasks/main.yml b/test/integration/targets/vmware_resource_pool/tasks/main.yml index 800ff2b94f..489a8c36ab 100644 --- a/test/integration/targets/vmware_resource_pool/tasks/main.yml +++ b/test/integration/targets/vmware_resource_pool/tasks/main.yml @@ -20,6 +20,7 @@ pip: name: pyvmomi state: latest + when: "{{ ansible_user_id == 'root' }}" - name: store the vcenter container ip set_fact: diff --git a/test/integration/targets/vmware_vm_facts/tasks/main.yml b/test/integration/targets/vmware_vm_facts/tasks/main.yml index ce80f5e0ec..ab374a5c03 100644 --- a/test/integration/targets/vmware_vm_facts/tasks/main.yml +++ b/test/integration/targets/vmware_vm_facts/tasks/main.yml @@ -21,6 +21,7 @@ pip: name: pyvmomi state: latest + when: "{{ ansible_user_id == 'root' }}" - name: store the vcenter container ip set_fact: diff --git a/test/integration/targets/vmware_vswitch/tasks/main.yml b/test/integration/targets/vmware_vswitch/tasks/main.yml index b96b90869a..ec000f9c73 100644 --- a/test/integration/targets/vmware_vswitch/tasks/main.yml +++ b/test/integration/targets/vmware_vswitch/tasks/main.yml @@ -7,6 +7,7 @@ pip: name: pyvmomi state: latest + when: "{{ ansible_user_id == 'root' }}" - name: store the vcenter container ip set_fact: