add debug for blacklist
This commit is contained in:
parent
34076c243e
commit
f258895234
@ -47,9 +47,14 @@ do
|
|||||||
echo ${j} >> ${BLACKLIST}
|
echo ${j} >> ${BLACKLIST}
|
||||||
/usr/sbin/iptables -A BLACKLIST -s ${j} -j DROP
|
/usr/sbin/iptables -A BLACKLIST -s ${j} -j DROP
|
||||||
done
|
done
|
||||||
for j in ${list_sender}
|
for j in ${list_sender[@]}
|
||||||
do
|
do
|
||||||
scp -i /home/valentin/.ssh-blacklist/id_rsa -P ${SSH} ${BLACKLIST} blacklist_user@${j}:/tmp/blacklist_${IP}
|
echo "Blacklist envoye a ${j}" >> ${MAIL}
|
||||||
|
echo "scp -i /home/valentin/.ssh-blacklist/id_rsa -P ${SSH} ${BLACKLIST} blacklist_user@${j}:/tmp/blacklist_${IP}" >> ${MAIL}
|
||||||
|
scp -i /home/valentin/.ssh-blacklist/id_rsa -P ${SSH} ${BLACKLIST} blacklist_user@${j}:/tmp/blacklist_${IP}i
|
||||||
|
if [ ${?} -ne 0 ]; then
|
||||||
|
echo "Error SCP for ${j}" >> ${MAIL}
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
echo "IP dejà blacklisté : " >> ${MAIL}
|
echo "IP dejà blacklisté : " >> ${MAIL}
|
||||||
cat ${BLACKLIST} >> ${MAIL}
|
cat ${BLACKLIST} >> ${MAIL}
|
||||||
|
@ -15,6 +15,11 @@
|
|||||||
src: virtualhost.j2
|
src: virtualhost.j2
|
||||||
dest: /etc/sentinel/virtualhost
|
dest: /etc/sentinel/virtualhost
|
||||||
mode: "0444"
|
mode: "0444"
|
||||||
|
with_items:
|
||||||
|
- virtualhost
|
||||||
|
- ip
|
||||||
|
- ssh_port
|
||||||
|
- exclude
|
||||||
vars:
|
vars:
|
||||||
ansible_become: yes
|
ansible_become: yes
|
||||||
ansible_become_method: sudo
|
ansible_become_method: sudo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user