Created
January 22, 2015 19:22
-
-
Save ryan-lane/1942ca62c3e074d58fdf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#grep maxlogins /etc/security/limits.conf /etc/security/limits.d/* | |
mycommand to be run: | |
- cmd | |
- run |
add_security_limits:
cmd.run:
- names:
- 'echo "#Configured to meet V-22298" >> /etc/security/limits.d/V-22298.conf'
- 'echo "* hard maxlogins 10" >> /etc/security/limits.d/V-22298.conf'
- unless: grep '^[^#].*maxlogins' /etc/security/limits.conf /etc/security/limits.d/*
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
so this is what I am doing:
So it runs fine. But when I add the tombstone I see this in the output:
[ERROR ] Command 'grep "^[^#].maxlogins" /etc/security/limits.conf /etc/security/limits.d/ > /dev/null 2>&1' failed with return code: 2
[ERROR ] output:
it still runs fine, but I see the error. Otherwise I just see info stuff, which is what I would expect even with the tombstone.
thought?