You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Default behaviour is to create your cluster in a cluster named folder in VMware, however this becomes an issue in VMware clusters where you have no permissions to do so - e.g. you have access to one absolute folder and that's that (you can't create any sub folders underneath it).
Older versions of this playbook had a folder_absolute_path you could set, which avoided this behaviour.
What's the easiest way to turn off folder creation and just have VMs deploy to a base folder you set?
The text was updated successfully, but these errors were encountered:
Then in the ./roles/vsphere_vm/tasks/main.yml by adjusting the vSphere folder creations:
- name: Create the vCenter folder by the same name as the cluster, only if it doesn't exist
community.vmware.vcenter_folder:
hostname: "{{ vcenter.ip }}"
username: "{{ vcenter.username }}"
password: "{{ vcenter.password }}"
datacenter_name: "{{ vcenter.datacenter }}"
validate_certs: no
folder_name: "{{ item[0] }}"
folder_type: vm
parent_folder: "{{ item[1] if item[1] not in ['', '/'] else omit }}"
state: present
loop: "{{ path_pairs }}"
when: 0 > 1
#when: vcenter.parent_folder is defined and vcenter.parent_folder is string
- name: Create the vCenter folder by the same name as the cluster, only if it doesn't exist
community.vmware.vcenter_folder:
hostname: "{{ vcenter.ip }}"
username: "{{ vcenter.username }}"
password: "{{ vcenter.password }}"
datacenter_name: "{{ vcenter.datacenter }}"
validate_certs: no
folder_name: "{{ cluster }}"
folder_type: vm
parent_folder: "{{ parent_folder | default(omit) }}"
state: present
when: 0 > 1
Is there an easier, better, safer way of accomplishing this?
Default behaviour is to create your cluster in a cluster named folder in VMware, however this becomes an issue in VMware clusters where you have no permissions to do so - e.g. you have access to one absolute folder and that's that (you can't create any sub folders underneath it).
Older versions of this playbook had a folder_absolute_path you could set, which avoided this behaviour.
What's the easiest way to turn off folder creation and just have VMs deploy to a base folder you set?
The text was updated successfully, but these errors were encountered: