I'll second the cron option. If you're like me and have only recently gotten sign-off for a tool like Puppet or Ansible, scripts and crons will still work while you transition to the CM tool. For example, I'll run this in cron.hourly to maintain a consistent state of the booleans available. It may not be perfect, but it's a nice go-between until we can finish implementing Puppet.
#!/bin/bash
## Use lists in /etc/selinux to set SELinux booleans to desired state
PREFIX=/etc/selinux
LOGFILE=/var/log/sebooleans
touch ${LOGFILE}
for state in on off; do
cat ${PREFIX}/booleans$state | while read variable; do
## getsebool is a lot faster than semanage for this task
if [[ "$( getsebool $variable | gawk '{print $3}' )" != "$state" ]]; then
## If we're running the script manually, output info to the screen
if [[ -z "$PS1" ]]; then
echo "Setting $variable to $state..."
fi
echo "Setting $variable to $state at $( date +%c )..." >> ${LOGFILE}
setsebool -P $variable $state
fi
done
done
I like the idea of a hash comparison. After the required action is taken, hash the relevant file and store it somewhere for reference later. Have Puppet execute your script, first hashing the relevant file and comparing it to your known value from last time. So, for your original question, the files modules/active/users.local and modules/active/seusers.final could provide you with the information that you'd want.
If that's no good, maybe you grep through these files to confirm the existence of your customizations, and for every one that is missing, append it to a temporary file, executing only the required commands with one semanage.