Commit 4af1c4a4 authored by David Kempe's avatar David Kempe
Browse files

windows ticket generation by dave

parent 3181ead7
......@@ -49,7 +49,26 @@
# TODO(otl): validate_certs yes when icinga_director_url is valid cert
validate_certs: no
register: icinga_client_ticket
when: icinga_client_generate_ticket == "director"
when:
- icinga_client_generate_ticket == "director"
- ansible_connection != 'winrm'
- name: Get Icinga client ticket (director).
win_uri:
headers:
Accept: application/json
url: "{{ icinga_director_url }}/host/ticket?name={{ icinga_client_fqdn }}"
user: "{{ icinga_director_user }}"
password: "{{ icinga_director_pass }}"
proxy_url: "{{ proxy_env }}"
return_content: yes
# TODO(otl): validate_certs yes when icinga_director_url is valid cert
validate_certs: no
register: icinga_client_ticket
when:
- icinga_client_generate_ticket == "director"
- ansible_connection == 'winrm'
- name: Get Icinga client ticket (ansible).
command: sudo -u nagios /usr/sbin/icinga2 pki ticket --cn {{ icinga_client_fqdn }} # Added nagios line to /etc/sudoers on above host, after #include line
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment