[copr] polishing keygen playbook; install instant-instance-killer script;
This commit is contained in:
parent
8d84f9aea7
commit
0a65add509
4 changed files with 15 additions and 5 deletions
|
@ -13,4 +13,3 @@ tcp_ports: ['22', '80', '443']
|
|||
# Copr vars
|
||||
copr_hostbase: copr-be-dev
|
||||
_copr_be_conf: copr-be.conf-dev
|
||||
signer_host: 209.132.184.124
|
||||
|
|
|
@ -29,5 +29,3 @@ copr_hostbase: copr-be
|
|||
|
||||
host_backup_targets: ['/var/lib/copr/public_html/results']
|
||||
_copr_be_conf: copr-be.conf
|
||||
# IP of copr-keygen.cloud.fedoraproject.org
|
||||
signer_host: 209.132.184.159
|
||||
|
|
11
roles/copr/backend/files/instant-instance-killer.sh
Normal file
11
roles/copr/backend/files/instant-instance-killer.sh
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
source /home/copr/cloud/ec2rc.sh
|
||||
|
||||
/bin/euca-describe-instances | grep INSTANCE | while read line; do
|
||||
id="$(echo $line | cut -d' ' -f2)"
|
||||
state="$(echo $line | cut -d' ' -f6)"
|
||||
if [[ "$state" == "error" ]]; then
|
||||
/bin/euca-terminate-instances "$id"
|
||||
fi
|
||||
done
|
|
@ -136,6 +136,8 @@
|
|||
copy: src="delete-forgotten-instances.cron" dest=/etc/cron.daily/delete-forgotten-instances owner=root group=root mode=755
|
||||
when: not devel
|
||||
|
||||
- name: add sign machine address into the sign.conf
|
||||
lineinfile: "dest=/etc/sign.conf regexp='^server' line='server: {{ signer_host }}'"
|
||||
- name: install script to kill VMs in error state
|
||||
copy: src="instant-instance-killer.sh" dest="/root/"
|
||||
|
||||
- cron: name="kill VMs in error state" minute="*/15" job="/root/instant-instance-killer.sh"
|
||||
when: not devel
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue