Decommision mig agents
This commit is contained in:
Родитель
6557092d16
Коммит
64b7e997db
|
@ -1,3 +0,0 @@
|
|||
---
|
||||
|
||||
mig_agent_package: "mig-agent_20170331-0.dbb2e7a.prod_amd64.deb"
|
|
@ -1,9 +0,0 @@
|
|||
description "Mig agent process"
|
||||
|
||||
start on (local-filesystems and net-device-up IFACE=eth0)
|
||||
stop on runlevel [!12345]
|
||||
|
||||
console log
|
||||
respawn
|
||||
|
||||
exec /sbin/mig-agent -f
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
|
||||
- name: restart mig
|
||||
service:
|
||||
name: mig
|
||||
state: restarted
|
|
@ -1,53 +0,0 @@
|
|||
---
|
||||
|
||||
- name: Register mig-agent package stat
|
||||
stat:
|
||||
path: "/opt/{{ mig_agent_package }}"
|
||||
register: mig_agent_file
|
||||
tags:
|
||||
- security
|
||||
- mig
|
||||
|
||||
|
||||
- name: Fetch mig-agent package from S3
|
||||
s3:
|
||||
aws_access_key: "{{ s3_deployment_access_key }}"
|
||||
aws_secret_key: "{{ s3_deployment_secret_key }}"
|
||||
bucket: "{{ s3_deployment_bucket }}"
|
||||
object: "{{ mig_agent_package }}"
|
||||
dest: "/opt/{{ mig_agent_package }}"
|
||||
mode: "get"
|
||||
when: mig_agent_file.stat.exists == False
|
||||
tags:
|
||||
- security
|
||||
- mig
|
||||
|
||||
- name: Install mig-agent
|
||||
apt:
|
||||
deb: "/opt/{{ mig_agent_package}}"
|
||||
when: mig_agent_file.stat.exists == False
|
||||
tags:
|
||||
- security
|
||||
- mig
|
||||
|
||||
- name: Configure mig-agent upstart service
|
||||
copy:
|
||||
src: mig_upstart.conf
|
||||
dest: /etc/init/mig.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
notify:
|
||||
- restart mig
|
||||
tags:
|
||||
- security
|
||||
- mig
|
||||
|
||||
- name: Enable mig-agent service
|
||||
service:
|
||||
name: mig
|
||||
state: started
|
||||
enabled: yes
|
||||
tags:
|
||||
- security
|
||||
- mig
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"checks": {
|
||||
"mig_check": {
|
||||
"handle": false,
|
||||
"command": "check-http.rb -u http://127.0.0.1:51664/pid",
|
||||
"subscribers": [
|
||||
"common"
|
||||
],
|
||||
"interval": 60
|
||||
}
|
||||
}
|
||||
}
|
|
@ -35,7 +35,6 @@
|
|||
- disk_usage_check.json
|
||||
- disk_metrics.json
|
||||
- mem_percent_metrics.json
|
||||
- mig_check.json
|
||||
notify:
|
||||
- restart sensu-api
|
||||
- restart sensu-server
|
||||
|
|
Загрузка…
Ссылка в новой задаче