Skip to content

Commit

Permalink
add az-cli for capz windows images
Browse files Browse the repository at this point in the history
  • Loading branch information
DannyBrito committed Oct 18, 2023
1 parent eae7788 commit 88b8c6e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
15 changes: 15 additions & 0 deletions images/capi/ansible/windows/roles/providers/tasks/azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,18 @@
members: "{{ users }}"
vars:
users: "{{ wire_server_users.split(',') if (wire_server_users is defined) and (wire_server_users | length > 0) else [] }}"

- name: Download Azure CLI MSI installer
ansible.windows.win_get_url:
url: https://aka.ms/installazurecliwindowsx64
dest: C:\azure-cli.msi

- name: Install Azure CLI
ansible.windows.win_package:
path: C:\azure-cli.msi
state: present

- name: Clean up Azure CLI Installer file
ansible.windows.win_file:
path: C:\azure-cli.msi
state: absent
5 changes: 4 additions & 1 deletion images/capi/packer/goss/goss-command.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ command:
- True
stderr: []
timeout: 30000

# this could be moved to place for other providers if they want to install it
Key Vault gMSA binary is installed:
exec: powershell -command "Test-Path -Path C:\Windows\System32\CCGAKVPlugin.dll"
Expand All @@ -246,6 +246,9 @@ command:
stdout:
- "ICcgDomainAuthCredentials"
timeout: 30000
Check Azure CLI is installed via alias:
exec: powershell -command "az"
exit-status: 0
{{end}}

{{ if ne .Vars.ssh_source_url "" }}
Expand Down

0 comments on commit 88b8c6e

Please sign in to comment.