anthcourtney / ansible-role-cis-amazon-linux

Ansible role to apply CIS Amazon Linux Benchmark v2.0.0
MIT License
154 stars 140 forks source link

Bugfix/gather facts of non disk mounts #59

Closed bredwrd closed 5 years ago

bredwrd commented 5 years ago

As mentioned by @dgutierrez1287 in this pull request, ansible_mounts does not contain facts about non-disk mounts which is a problem for tasks 1.1.15, 1.1.16 and 1.1.17 which define attributes for the /dev/shm mount which happens to be tmpfs. However, that pull request invokes the custom facts in a way that would not have the desired effect because the facts are not copied to the managed node, where ansible expects custom facts to be defined.

In this PR, I've used @dgutierrez1287's wonderful all_mounts fact script in a different way which allows the script to be run on the target host, and registered for use by the control node.