ansible-role-cis-amazon-linux
ansible-role-cis-amazon-linux copied to clipboard
Amazon Linux 2 fails with "not suitable"
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)
I have added a new item (- "2") at vars/main.yml "cis_target_os_versions:" var and it work for me.
Thanks, I will try this.
Alternatively you can override discovered facts:
- set_fact:
ansible_distribution_version: "2017.12"
And then execute the rest.