Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🧹 fix error with os provider for windows installation #56

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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