Giter Site home page Giter Site logo

uestueno / ansible-collection-icinga-director Goto Github PK

View Code? Open in Web Editor NEW

This project forked from telekom-mms/ansible-collection-icinga-director

0.0 0.0 0.0 420 KB

An Ansible collection that contains modules to change objects in Icinga 2 using the director API.

License: GNU General Public License v3.0

Python 96.07% Shell 3.93%

ansible-collection-icinga-director's Introduction

Icinga Director Collection for Ansible

ci-ansible-test codecov

This collection contains Ansible modules and a role to change objects in Icinga 2 using the director API.

Required Ansible version: 2.9

Currently supported modules:

  • icinga_command_template
  • icinga_command
  • icinga_endpoint
  • icinga_host_template
  • icinga_host
  • icinga_hostgroup
  • icinga_notification
  • icinga_notification_template
  • icinga_service
  • icinga_service_apply
  • icinga_service_template
  • icinga_servicegroup
  • icinga_timeperiod
  • icinga_user_template
  • icinga_user
  • icinga_zone

Installation

These modules are distributed as collections. To install them, run:

ansible-galaxy collection install t_systems_mms.icinga_director

Alternatively put the collection into a requirements.yml-file:

---
collections:
- t_systems_mms.icinga_director

Examples using the modules

See the examples directory for a complete list of examples.

- hosts: localhost
  collections:
    - t_systems_mms.icinga_director
  tasks:
    - name: create a host in icinga
      t_systems_mms.icinga_director.icinga_host:
        state: present
        url: "https://example.com"
        url_username: "{{ icinga_user }}"
        url_password: "{{ icinga_pass }}"
        object_name: "{{ ansible_hostname }}"
        address: "{{ ansible_default_ipv4.address }}"
        display_name: "{{ ansible_hostname }}"
        groups:
          - "foo"
        imports:
          - "StandardServer"
        vars:
          dnscheck: "no"

Examples using the role

Please see the README of the role.

Troubleshooting

If the following error is thrown, check if you're behind a proxy and use force_basic_auth: true in the task.

fatal: [localhost]: FAILED! => {"changed": false, "msg": "bad return code while creating: -1. Error message: Request failed: <urlopen error Tunnel connection failed: 302 Found>"}

Local Testing

  • Linting with tox
> tox -elinters
  • Integration tests with docker
# run icinga in a container and forward port 80
> docker run -d -p 80:80 jordan/icinga2

# run the ansible playbooks against the container
> ansible-playbook tests/integration/targets/icinga/normalmode.yml
> ansible-playbook tests/integration/targets/icinga/checkmode.yml

Extras

  • Use our code snippets template supported in Visual Studio Code

Please see the README for more information.

License

GPLv3

Author Information

  • Sebastian Gumprich
  • Lars Krahl
  • Michaela Mattes

ansible-collection-icinga-director's People

Contributors

anbenn avatar michaelamattes avatar mmslkr avatar rndmh3ro avatar schurzi avatar xfuture603 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.