Skip to content

Execute Ansible playbooks in response to ServiceNow incidents

Notifications You must be signed in to change notification settings

Dapacruz/ansiblenow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AnsibleNow

Execute Ansible playbooks in response to ServiceNow incidents

Features

  • Triggers the execution of Ansible playbooks in response to ServiceNow incidents
  • Adds handled incidents to a database to prevent duplicate playbook executions
  • Removes incidents from the database after one year
  • Adds running Ansible jobs to a database to track job status
  • Removes jobs from the database after completion
  • Updates incident work notes when executing playbooks and when jobs complete
  • Detailed logging with file rotation
  • Email notifications on errors
  • Command line arguments for populating the handled incidents database only and testing
  • Containerized to eliminate dependency issues

Usage Guide

Build

docker build -t ansiblenow .

Test

docker run --env-file .env -v $(pwd):/usr/src/ansiblenow ansiblenow python ansiblenow.py --test

Test Interactively

docker run --env-file .env -itv $(pwd):/usr/src/ansiblenow ansiblenow /bin/bash

Run

docker run --env-file .env -v $(pwd):/usr/src/ansiblenow ansiblenow

Main Files

  • ansiblenow.py: Main Python script
  • Dockerfile: Docker build file
  • requirements.txt: Python dependencies
  • .env.example: Example environment file

About

Execute Ansible playbooks in response to ServiceNow incidents

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published