Skip to content

Commit

Permalink
🧹 fix error with os provider for windows installation (#56)
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Münch <[email protected]>
  • Loading branch information
atomic111 authored Nov 30, 2023
1 parent 344617a commit 62ec314
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tasks/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@
path: "{{ pkg_version_url }}"
state: present

- name: Get current cnspec version
ansible.windows.win_command: cnspec version
args:
chdir: "C:\\Program Files\\Mondoo"
register: cnspec_version

- name: Ensure we have the latest os provider installed
ansible.windows.win_command: cnspec providers install os
args:
chdir: "C:\\Program Files\\Mondoo"
when: not ansible_check_mode and cnspec_version.stdout is match(".*cnspec 9.*")

- name: Logout cnquery and cnspec from Mondoo platform
ansible.windows.win_command: cnspec.exe logout --force --config C:\\ProgramData\\Mondoo\\mondoo.yml
args:
Expand Down

0 comments on commit 62ec314

Please sign in to comment.