# Ansible Icinga Director Deploy - t\_systems\_mms.icinga\_director

**URL:** <https://community.icinga.com/t/ansible-icinga-director-deploy-t-systems-mms-icinga-director/10920>\
**Category:** Automation & Infrastructure\
**Tags:** director\
**Created:** [October 27, 2022, 4:48pm UTC](https://community.icinga.com/t/ansible-icinga-director-deploy-t-systems-mms-icinga-director/10920 "2022-10-27T16:48:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![L5D4me](https://community.icinga.com/letter_avatar_proxy/v4/letter/l/edb3f5/32.png) [@L5D4me](https://community.icinga.com/u/L5D4me)\
**Post date:** [October 27, 2022, 4:48pm UTC](https://community.icinga.com/t/ansible-icinga-director-deploy-t-systems-mms-icinga-director/10920/1 "2022-10-27T16:48:04Z")

</div>

Hello All!

Ive been using the new Icinga Collection for Ansible (F Amazing guys!)

The one thing im lacking or having trouble finding is a way to kick off a Director Deploy.

Im using your new Ansible Collection for 100% of my Icinga tasks EXCEPT for the actual Director Deploy

Right now im forced to use something like this

(The var director\_url\_deploy references this url “…/director/config/deploy”)

```auto
- name: Deploy Changes in Icinga Director
  tags: uri
  uri:
    validate_certs: no
    url: "{{ director_url_deploy }}"
    headers:
      Accept: application/json
    method: POST
    user: "{{ icinga_username }}"
    password: "{{ icinga_password }}"
    return_content: true
  retries: 3
  delay: 5
  register: deploy_result
  until: deploy_result is not failed

```

I scoured the docs for the new collections, but couldn’t find a way to kick off a deploy.

Am i missing something stupid?

TIA

---

<div class="post-metadata">

**Author:** ![david-ungurean](https://community.icinga.com/user_avatar/community.icinga.com/david-ungurean/32/6122_2.png) [@david-ungurean](https://community.icinga.com/u/david-ungurean)\
**Post date:** [November 7, 2022, 7:28am UTC](https://community.icinga.com/t/ansible-icinga-director-deploy-t-systems-mms-icinga-director/10920/2 "2022-11-07T07:28:12Z")

</div>

Hi L5D4me,

Unfortunately, the t\_systems\_mms.icinga\_director module pushes the host only in Icinga Directory. There is no way to deploy the changes automatically through ansible script.

But you can create automatic jobs which will deploy your changes!

[https://icinga.com/docs/icinga-director/latest/doc/79-Jobs/](https://icinga.com/docs/icinga-director/latest/doc/79-Jobs/)

David

---

<div class="post-metadata">

**Author:** ![rndmh3ro](https://community.icinga.com/user_avatar/community.icinga.com/rndmh3ro/32/2980_2.png) [@rndmh3ro](https://community.icinga.com/u/rndmh3ro)\
**Post date:** [May 23, 2023, 8:26am UTC](https://community.icinga.com/t/ansible-icinga-director-deploy-t-systems-mms-icinga-director/10920/3 "2023-05-23T08:26:45Z")

</div>

In the latest [version](https://github.com/T-Systems-MMS/ansible-collection-icinga-director/releases/tag/1.33.0) we added a module to deploy changes:

```auto
- name: Deploy the icinga config
  t_systems_mms.icinga_director.icinga_deploy:
    url: "{{ icinga_url }}"
    url_username: "{{ icinga_user }}"
    url_password: "{{ icinga_pass }}"

```

The version isn’t in the ansible-package yet, so you have to manually install it or wait for a new ansible release.

---

<div class="post-metadata">

**Author:** ![david-ungurean](https://community.icinga.com/user_avatar/community.icinga.com/david-ungurean/32/6122_2.png) [@david-ungurean](https://community.icinga.com/u/david-ungurean)\
**Post date:** [May 24, 2023, 12:57pm UTC](https://community.icinga.com/t/ansible-icinga-director-deploy-t-systems-mms-icinga-director/10920/4 "2023-05-24T12:57:52Z")

</div>

Hi Sebastian,

Can you help me to understand, why, I cannot deploy the changes to directory?

Here is my ansible script:

```auto
- name: Add Host to icinga
  t_systems_mms.icinga_director.icinga_host:
    state: present
    validate_certs: no
    url: "{{ url }}"
    url_username: "{{ icinga_user }}"
    url_password: "{{ icinga_password }}"
    accept_config: true
    address: "{{ ansible_default_ipv4['address'] }}"
    check_command: hostalive
    disabled: false
    object_name: "{{ ansible_hostname }}"

- name: Deploy the icinga config
  t_systems_mms.icinga_director.icinga_deploy:
    url: "{{ url }}"
    validate_certs: no
    url_username: "{{ icinga_user }}"
    url_password: "{{ icinga_password }}"

```

And the error I get:

 ![image](https://community.icinga.com/uploads/default/original/2X/f/f442ef20b0131dbfd5db5172a2d7fb52378b2fa9.png)

And the URL is correct!

Thank you!!!

---

<div class="post-metadata">

**Author:** ![david-ungurean](https://community.icinga.com/user_avatar/community.icinga.com/david-ungurean/32/6122_2.png) [@david-ungurean](https://community.icinga.com/u/david-ungurean)\
**Post date:** [June 15, 2023, 6:34am UTC](https://community.icinga.com/t/ansible-icinga-director-deploy-t-systems-mms-icinga-director/10920/5 "2023-06-15T06:34:44Z")

</div>

Hi!  
Any help will be appreciated!  
Thanks
