diff --git a/README.md b/README.md index 63c5641..77609f9 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ This playbook demonstrates how to use the Mondoo Package role to install `cnquer - hosts: linux_hosts become: yes roles: - - role: mondoo.client + - role: ansible-mondoo # if used from galaxy: mondoo.client vars: registration_token: "changeme" ``` @@ -76,7 +76,7 @@ In addition we support the following variables: - hosts: linux_hosts become: yes roles: - - role: mondoo.client + - role: ansible-mondoo # if used from galaxy: mondoo.client vars: registration_token: "changeme" force_registration: true @@ -96,7 +96,7 @@ If you want to use cnspec behind a proxy https_proxy: "http://192.168.56.1:3128" roles: - - role: mondoo.client + - role: ansible-mondoo # if used from galaxy: mondoo.client vars: registration_token: "changeme" force_registration: true @@ -107,8 +107,12 @@ If you want to use cnspec behind a proxy 1. Run the playbook with the local hosts file ```bash -# download mondoo role +# download mondoo role from github +ansible-galaxy role install git+https://github.com/mondoohq/ansible-mondoo.git + +# (alternative) download mondoo role from ansible galaxy ansible-galaxy install mondoo.client + # apply the playbook ansible-playbook -i hosts playbook.yml ``` @@ -139,7 +143,7 @@ If you are targeting windows, the configuration is slightly different since `bec ```yaml - hosts: windows_hosts roles: - - role: mondoo.client + - role: ansible-mondoo # if used from galaxy: mondoo.client vars: registration_token: "changeme" force_registration: false diff --git a/tasks/linux_login.yml b/tasks/linux_login.yml index 2984498..afec0bd 100644 --- a/tasks/linux_login.yml +++ b/tasks/linux_login.yml @@ -3,6 +3,11 @@ --- +- name: Ensure we have the latest os provider installed + ansible.builtin.command: cnspec providers install os + become: "{{ use_become }}" + when: not ansible_check_mode + - name: Create mondoo config directory ansible.builtin.file: dest: /etc/opt/mondoo