mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-08-06 14:14:28 -07:00
initial commit of stackdriver_monitoring role for GCP Stackdriver
This commit is contained in:
parent
282f8e3b82
commit
ac34d661ff
15 changed files with 246 additions and 0 deletions
18
roles/stackdriver_monitoring/tasks/debian.yml
Normal file
18
roles/stackdriver_monitoring/tasks/debian.yml
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
- name: Stackdriver Monitoring | Debian | Add the Stackdriver repository
|
||||
apt_repository:
|
||||
repo: "deb {{ stackdriver_mon_apt_repo_url }} {{ stackdriver_mon_apt_repo_name }} main"
|
||||
filename: google-cloud-monitoring
|
||||
state: present
|
||||
|
||||
- name: Stackdriver Monitoring | Debian | Ensure Stackdriver's GPG key is available.
|
||||
apt_key:
|
||||
url: "{{ stackdriver_mon_apt_repo_url }}/doc/apt-key.gpg"
|
||||
state: present
|
||||
|
||||
- name: Stackdriver Monitoring | Debian | Install the Stackdriver agent
|
||||
apt:
|
||||
name: "{{ stackdriver_mon_package_name }}"
|
||||
state: present
|
||||
update_cache: yes
|
||||
notify: Stackdriver Monitoring | Restart Stackdriver Agent
|
5
roles/stackdriver_monitoring/tasks/main.yml
Normal file
5
roles/stackdriver_monitoring/tasks/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
# tasks file for stackdriver_monitoring
|
||||
|
||||
- name: Stackdriver Monitoring | OS Based Installation
|
||||
include_tasks: "{{ ansible_os_family|lower }}.yml"
|
21
roles/stackdriver_monitoring/tasks/redhat.yml
Normal file
21
roles/stackdriver_monitoring/tasks/redhat.yml
Normal file
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
- name: Stackdriver Monitoring | RedHat | Install the Python bindings for SELinux
|
||||
yum: name=libselinux-python state=present
|
||||
|
||||
- name: Stackdriver Monitoring | RedHat | Add the Stackdriver repository
|
||||
yum_repository:
|
||||
name: google-cloud-monitoring
|
||||
description: Google Cloud Monitoring Agent Repository
|
||||
baseurl: "{{ stackdriver_mon_yum_repo }}"
|
||||
file: google-cloud-monitoring
|
||||
enabled: yes
|
||||
gpgcheck: yes
|
||||
repo_gpgcheck: yes
|
||||
gpgkey: "{{ stackdriver_mon_yum_gpg_key }}"
|
||||
|
||||
|
||||
- name: Stackdriver Monitoring | RedHat | Install Stackdriver agent
|
||||
yum:
|
||||
name: "{{ stackdriver_mon_package_name }}"
|
||||
state: present
|
||||
notify: Stackdriver Monitoring | Restart Stackdriver Agent
|
Loading…
Add table
Add a link
Reference in a new issue