ansible-role-cis-amazon-linux icon indicating copy to clipboard operation
ansible-role-cis-amazon-linux copied to clipboard

Amazon Linux 2 fails with "not suitable"

Open twolsten opened this issue 5 years ago • 3 comments

Leveraging packer to build Amazon Linux 2 ami and get the following error:

amazon-ebs: TASK [anthcourtney.cis-amazon-linux : Preflight - Fail if host is not suitable for this benchmark] ***
amazon-ebs: fatal: [127.0.0.1]: FAILED! => {"changed": false, "msg": "This benchmark is not suitable for the destination operating system"}

Using latest Amazon Linux 2 AMI (ami-00dc79254d0461090)

twolsten avatar Nov 19 '19 03:11 twolsten

I have added a new item (- "2") at vars/main.yml "cis_target_os_versions:" var and it work for me.

nebul4ck avatar Nov 21 '19 15:11 nebul4ck

Thanks, I will try this.

twolsten avatar Nov 26 '19 14:11 twolsten

Alternatively you can override discovered facts:

- set_fact:
     ansible_distribution_version: "2017.12"

And then execute the rest.

gbvanrenswoude avatar Mar 30 '20 09:03 gbvanrenswoude