-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix: cloud init problems with ubuntu (#1150) * fix: install guest info if cloud init version is > 23.1.2 * ci: adds basic ubuntu test * fix: adds handling for redhat system and cloud init * !fixup: higher parallel * fix: adds override for ubuntu tests * do not merge: build basic os for ubuntu * do not merge: ensure new cloud init for tests * fix: remove package pining * fix: remvove cloud-init dropin for custom vmware guest datasource * fix: magefile configuration to create vsphere infa override file --------- * ci: run rocky basic e2e tests --------- Signed-off-by: Daniel Lipovetsky <[email protected]> Co-authored-by: Faiq <[email protected]>
- Loading branch information
1 parent
5bc0a63
commit 4be94f6
Showing
3 changed files
with
61 additions
and
56 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
- name: Get package facts | ||
ansible.builtin.package_facts: | ||
manager: "auto" | ||
|
||
- name: Set cloud-init version | ||
ansible.builtin.set_fact: | ||
cloud_init_version: "{{ ansible_facts.packages['cloud-init'][0].version }}" | ||
|
||
# this program used by ds-identify to determine whether or not the | ||
# VMwareGuestInfo datasource is useable. | ||
- name: Directly install GuestInfo | ||
when: cloud_init_version is version('21.3', '<') | ||
block: | ||
|
||
- name: Copy vmware guestinfo datasource | ||
copy: | ||
src: "{{ item }}" | ||
dest: /tmp/ | ||
owner: root | ||
group: root | ||
mode: 0755 | ||
with_items: | ||
- cloud-init-vmware.sh | ||
- DataSourceVMwareGuestInfo.py | ||
|
||
- name: Create ds-check program to verify VMwareGuestInfo datasource | ||
copy: | ||
src: files/dscheck_VMwareGuestInfo.sh | ||
dest: /usr/bin/dscheck_VMwareGuestInfo | ||
owner: root | ||
group: root | ||
mode: 0755 | ||
|
||
- name: Execute cloud-init-vmware.sh | ||
shell: bash -o errexit -o pipefail /tmp/cloud-init-vmware.sh | ||
environment: | ||
VMWARE_DS_PATH: '/tmp/DataSourceVMwareGuestInfo.py' | ||
|
||
- name: Remove cloud-init-vmware.sh | ||
file: | ||
path: /tmp/cloud-init-vmware.sh | ||
state: absent | ||
|
||
# sets the datasource_list to VMwareGuestInfo for all OS | ||
# ensure that VMwareGuestInfo overrides existing datasource drop-ins if it exists. | ||
- name: Copy cloud-init config file for vmware | ||
copy: | ||
src: files/etc/cloud/cloud.cfg.d/99-DataSourceVMwareGuestInfo.cfg | ||
dest: /etc/cloud/cloud.cfg.d/99-DataSourceVMwareGuestInfo.cfg | ||
owner: root | ||
group: root | ||
mode: 0644 |
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