Skip to main content

Nautobot Chatpops Ansible Tower integration

Project description

nautobot-plugin-chatops-ansible

A plugin for Nautobot Chatops Plugin

Installation

Build Status

Branch Status
main Build Status
develop Build Status

The plugin is available as a Python package in PyPI and can be installed with pip

pip install git+https://github.com/nautobot/nautobot-plugin-chatops-ansible.git

This ChatOps Plugin to Nautobot ChatOps Plugin requires the following list of environment variables to be added into the environment.

  • NAUTOBOT_TOWER_URI: Ansible Tower HTTP URI
  • NAUTOBOT_TOWER_USERNAME: Ansible Tower username
  • NAUTOBOT_TOWER_PASSWORD: Ansible Tower password

Once you have updated your environment file, restart both nautobot and nautobot-worker

$ sudo systemctl restart nautobot nautobot-worker

Usage

Command setup

Add a slash command to Slack called /ansible. See the nautobot-chatops installation guide for instructions on adding a slash command to your Slack channel.

You may need to adjust your Access Grants in Nautobot depending on your security requirements.

Contributing

Pull requests are welcomed and automatically built and tested against multiple version of Python and multiple version of Nautobot through TravisCI.

The project is packaged with a light development environment based on docker-compose to help with the local development of the project and to run the tests within TravisCI.

The project is following Network to Code software development guideline and is leveraging:

  • Black, Pylint, Bandit and pydocstyle for Python linting and formatting.
  • Django unit test to ensure the plugin is working properly.

CLI Helper Commands

The project is coming with a CLI helper based on invoke to help setup the development environment. The commands are listed below in 3 categories dev environment, utility and testing.

Each command can be executed with invoke <command>. All commands support the arguments --nautobot-ver and --python-ver if you want to manually define the version of Python and Nautobot to use. Each command also has its own help invoke <command> --help

Local dev environment

  build            Build all docker images.
  debug            Start Nautobot and its dependencies in debug mode.
  destroy          Destroy all containers and volumes.
  start            Start Nautobot and its dependencies in detached mode.
  stop             Stop Nautobot and its dependencies.

Utility

  cli              Launch a bash shell inside the running Nautobot container.
  create-user      Create a new user in django (default: admin), will prompt for password.
  makemigrations   Run Make Migration in Django.
  nbshell          Launch a nbshell session.

Testing

  tests            Run all tests.
  pydocstyle       Run pydocstyle to validate docstring formatting adheres to NTC defined standards.
  bandit           Run bandit to validate basic static code security analysis.
  black            Run black to check that Python files adhere to its style standards.
  unittest         Run Django unit tests for the plugin.

Questions

For any questions or comments, feel free to swing by the Network to Code slack channel (channel #networktocode). Sign up here

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nautobot-chatops-ansible-1.0.2.tar.gz (26.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nautobot_chatops_ansible-1.0.2-py3-none-any.whl (29.6 kB view details)

Uploaded Python 3

File details

Details for the file nautobot-chatops-ansible-1.0.2.tar.gz.

File metadata

  • Download URL: nautobot-chatops-ansible-1.0.2.tar.gz
  • Upload date:
  • Size: 26.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.6.7 Linux/4.15.0-1077-gcp

File hashes

Hashes for nautobot-chatops-ansible-1.0.2.tar.gz
Algorithm Hash digest
SHA256 35f43612a538b5dc9a930de25bab7447cc3e5984b77f98cb16d0115be010f9eb
MD5 cc597c41174255c2d61b37b6d0b6f444
BLAKE2b-256 6573dd95aca978b6a2ff3ce5c257f43927bad4309dfccf591df6f08f82bb7e6a

See more details on using hashes here.

File details

Details for the file nautobot_chatops_ansible-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for nautobot_chatops_ansible-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9b84a22331301df7937fdc3619e525296021f85269e6982774782a62fca45cb8
MD5 c20936c65a562108ddc428350e19d067
BLAKE2b-256 77edcbc905106dd1b3c05179b3972c2be7d3d98584a6842a6328b36d1ae3b19f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page