phil_avery.og_oec
Ansible Role: og-oec
This role installs and sets up the Opsgenie Edge Connector (OEC) on servers running RedHat/Centos and Debian/Ubuntu.
It installs the latest OEC version from the OpsGenie AWS S3 Bucket for RedHat-based systems or from apt for Debian-based systems. You may need to perform additional setup after this role completes, such as adding your scripts referenced in the OEC configuration file.
You can find the official documentation for OEC from Atlassian here: https://docs.opsgenie.com/docs/oec-overview
Note: You can use this role alongside the oec-runner role to connect Ansible Runner with OEC.
Requirements
None.
Role Variables
You can find the available variables and their default values in defaults/main.yml:
Minimum Setup Needed
conf_apiKey: <Your Opsgenie Integration API Key>
conf_actions:
- name: <Action Name>
sourceType: local
filepath: <Path to your script>
OR IF USING GIT
conf_apiKey: <Your Opsgenie Integration API Key>
conf_actions:
- name: <Action Name>
sourceType: git
filepath: <Path to your script>
giturl: https://github.com/repo/name.git
gitprvkey: Git Private Key
gitpassphrase: Git Pass Phrase
OEC Service Settings
oec_conf_source_type: local
oec_conf_local_filepath: /etc/opsgenie/
oec_conf_template: oecconfig.yml.j2
oec_conf_file_path: /etc/opsgenie/
oec_conf_file: oecconfig.yml
__oec_user: opsgenie
oec_group: opsgenie
__oec_svc_name: oec
oec_svc_path: /etc/systemd/system/
oec_svc_template: svc.j2
oec_svc_env_template: svc_env.j2
oec_svc_env_file: oec.env
Global Configuration Settings
conf_appName: OEC
conf_baseUrl: https://api.opsgenie.com
conf_logLevel: info
conf_poller_wait: 100
conf_poller_Timeout: 30
conf_poller_maxmsgs: 10
conf_pool_max_workers: 12
conf_pool_min_workers: 4
conf_pool_queueSize: 0
conf_pool_keepalive: 6000
conf_pool_monitoring_period: 15000
conf_globalArgs:
args:
- arg1
- arg2
conf_globalFlag:
flags:
- key: key1
value: value1
- key: key2
value: value2
conf_globalEnv:
env:
- key: key1
value: value1
- key: key2
value: value2
Action Mapping Settings
conf_actions:
- name: <Action Name>
sourceType: local
filepath: <Path to your script>
args:
- arg1
- arg2
flags:
- key: key1
value: value1
- key: key2
value: value2
env:
- key: key1
value: value1
- key: key2
value: value2
stdout: '/var/log/customaction.log'
stderr: '/var/log/customaction_err.log'
Custom Action from Git Source
conf_actions:
- name: <Action Name>
sourceType: git
filepath: <Path to your script>
giturl: https://github.com/repo/name.git
gitprvkey: Git Private Key
gitpassphrase: Git Pass Phrase
args:
- arg1
- arg2
flags:
- key: key1
value: value1
- key: key2
value: value2
env:
- key: key1
value: value1
- key: key2
value: value2
stdout: '/var/log/customaction.log'
stderr: '/var/log/customaction_err.log'
Dependencies
None.
Example Playbook
- hosts: server
roles:
- { role: phil_avery.og_oec }
License
MIT / BSD
Author Information
This role was created in 2019 by Phil Avery.
Opsgenie Edge Connector installation for Linux.
ansible-galaxy install phil_avery.og_oec