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

Gather facts of non-disk mounts for tasks 1.1.15, 1.1.16, 1.1.17 #60

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 facts are collected from the control node and not the managing node.

In this PR, I've used @dgutierrez1287's wonderful all_mounts fact script in a different way which collects facts from the managed node. I've also extracted the custom facts script invocation to a tasks file which can be included to minimize code duplication.

chandanchowdhury commented 5 years ago

Thanks @bstock92 for submitting the PR. Could you please change the PR to merge with the build branch.

bredwrd commented 5 years ago

@chandanchowdhury done

chandanchowdhury commented 5 years ago

Thanks @bstock92 :)

I am working on few cosmetic and other types changes, once the changes are finalized will perform couple of rounds of testing and merge all of them into master.