Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jtyr/ansible-vmware_image_upload
Ansible role to upload VM image to a vCenter server.
https://github.com/jtyr/ansible-vmware_image_upload
ansible ansible-role template vm vmware vmware-esxi vmware-vsphere
Last synced: 23 days ago
JSON representation
Ansible role to upload VM image to a vCenter server.
- Host: GitHub
- URL: https://github.com/jtyr/ansible-vmware_image_upload
- Owner: jtyr
- License: mit
- Created: 2019-09-23T09:28:52.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-16T14:56:12.000Z (almost 5 years ago)
- Last Synced: 2024-10-04T16:41:29.463Z (about 1 month ago)
- Topics: ansible, ansible-role, template, vm, vmware, vmware-esxi, vmware-vsphere
- Language: Python
- Size: 7.81 KB
- Stars: 4
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
vmware_image_upload
===================Ansible role which helps to upload VM image to VMware vCenter.
The configuration of the role is done in such way that it should not be
necessary to change the role for any kind of configuration. All can be
done either by changing role parameters or by declaring completely new
configuration as a variable. That makes this role absolutely
universal. See the examples below for more details.Please report any issues or send PR.
Examples
--------```yaml
---- name: Example of how to upload VM image to vCenter
hosts: vcenter-servers
gather_facts: no
vars:
vmware_image_upload_username: mydomain\\myuser
vmware_image_upload_password: MyT0pS3cr3tP4Sw0rd!
vmware_image_upload_datacenter: MYDC1
vmware_image_upload_cluster: mycluster
vmware_image_upload_datastore: datastore1
vmware_image_upload_network: mynet
vmware_image_upload_folder: /{{ vmware_image_upload_datacenter }}/vm/Templates
vmware_image_upload_name: Golden-VMware-CentOS-7-1567778833
vmware_image_upload_ovf: /path/to/the/{{ vmware_image_upload_name }}.ovf
roles:
- role: vmware_image_upload
tags: vmware_image_upload
```Role variables
--------------```yaml
# vCenter hostname
vmware_image_upload_hostname: "{{ ansible_host }}"# vCenter port number
vmware_image_upload_port: 443# Whether to validate SSL certificates
vmware_image_upload_validate_certs: no# Reguired variables which must be specified by the user
vmware_image_upload_username: null
vmware_image_upload_password: null
vmware_image_upload_name: null
vmware_image_upload_datacenter: null
vmware_image_upload_cluster: null
vmware_image_upload_datastore: null
vmware_image_upload_folder: null
vmware_image_upload_network: null
vmware_image_upload_networks: "{u'VM Network':u'{{ vmware_image_upload_network }}'}"
vmware_image_upload_ovf: null# Set to 'absent' to delete the uploaded image
#vmware_image_upload_state: null# Whether to remove the NIC before turning VM into template
vmware_image_upload_remove_nic: yes
```License
-------MIT
Author
------Jiri Tyr