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
- name: Log in as pi user to disable root | |
hosts: nodes | |
user: "pi" | |
gather_facts: false | |
become: yes | |
tasks: | |
- name: Disable root login over SSH | |
lineinfile: dest=/etc/ssh/sshd_config regexp="^PermitRootLogin" line="PermitRootLogin no" state=present | |
notify: |
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
sudo tail -fn0 /var/log/httpd/error_log | \ | |
while read line ; do | |
echo "$line" | grep "[error]" | |
if [ $? = 0 ] | |
then | |
echo "Error from Apptest Regalli : $line" | mail -s "Error message email" help@regalii.com | |
fi | |
done |