Created
December 6, 2015 05:52
-
-
Save bedecarroll/9af1bde860dfd2199e5d to your computer and use it in GitHub Desktop.
Ansible playbook to install the VMware ESXi Embedded Host Client. Requires the VIB (esxui-signed.vib) to be in the folder as the playbook. Will install or upgrade as required.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: esxi | |
tasks: | |
- name: Get list of installed VIBs | |
shell: esxcli software vib get -n "esx-ui" | |
register: vibs | |
changed_when: false | |
ignore_errors: yes | |
- debug: var=vibs.stdout | |
- name: Copy esxui-signed.vib to ESXi Host | |
copy: src=esxui-signed.vib dest=/tmp/esxui-signed.vib | |
- name: Run an upgrade if VIB is already installed | |
shell: esxcli software vib update -v /tmp/esxui-signed.vib | |
when: "'VMware_bootbank_esx-ui' in vibs.stdout" | |
- name: If not installed, install it | |
shell: esxcli software vib install -v /tmp/esxui-signed.vib | |
- name: Remove ui line from rhttpproxy | |
lineinfile: dest=/etc/vmware/rhttpproxy/endpoints.conf state=absent regexp="/ui local 8308 redirect allow" | |
notify: restart rhttpproxy | |
- name: Confirm VIB is installed | |
shell: esxcli software vib get -n "esx-ui" | |
register: vibs | |
changed_when: false | |
ignore_errors: yes | |
- debug: var=vibs.stdout | |
handlers: | |
- name: restart rhttpproxy | |
shell: /etc/init.d/rhttpproxy restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment