Skip to content

Commit

Permalink
add option to start service delayed on windows hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
rbicker committed Feb 28, 2020
1 parent 9c72e5b commit a4d2dbc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ icinga2_node_service_restart: yes #should the service be restarted on node | DEF
icinga2_node_nagios_plugins: ['nagios-plugins-all'] #nagios plugins to install | DEFAULT: ['nagios-plugins-all']
icinga2_node_service_username: ".\\Administrator" #username for icinga service on windows hosts | DEFAULT: undefined
icinga2_node_service_password: "MySecret" #username for icinga service on windows hosts | DEFAULT: ""
icinga2_node_service_delayed: yes #start icinga2 service in delayed mode on windows | DEFAULT: no

# parent zone / endpoint
icinga2_parent_zone: master #name of the parent zone | DEFAULT: master
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ icinga2_node_global_zone: global-templates
icinga2_node_features: [api, checker, mainlog]
icinga2_node_nagios_plugins: [nagios-plugins-all]
icinga2_node_service_password: ""
icinga2_node_service_delayed: no
icinga2_node_local_conf: no
icinga2_node_sync_ca: no
icinga2_node_service_restart: yes
Expand Down
6 changes: 6 additions & 0 deletions tasks/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
when: icinga2_node_service_username is defined
notify: windows node restart icinga2 service

- name: ensure service is delayed
win_service:
name: icinga2
start_mode: delayed
when: icinga2_node_service_delayed

- name: configuration
include_tasks: windows_config.yml
when: not icinga2_install_only

0 comments on commit a4d2dbc

Please sign in to comment.