You've already forked role-check-mk-agent
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 396d711be9 | |||
| 9d974bdf0c |
3
.ansible-lint
Normal file
3
.ansible-lint
Normal file
@@ -0,0 +1,3 @@
|
||||
# .ansible-lint │
|
||||
warn_list: # or 'skip_list' to silence them completely │
|
||||
- '106' # Role name {} does not match ``^[a-z][a-z0-9_]+$`` pattern
|
||||
@@ -23,3 +23,8 @@ cmk_auth: "&_username={{ cmk_username }}&_secret={{ cmk_secret }}"
|
||||
# This variable is used to detect whether this is a fresh install
|
||||
# Is changed to true if check-mk-agent gets installed
|
||||
cmk_fresh_install: false
|
||||
|
||||
# This variable if set to true will force installation to run regardless of whether
|
||||
# CheckMK is already installed.
|
||||
# Breaks idempotence but allows role to be used to force upgrade agents.
|
||||
cmk_force_install: false
|
||||
|
||||
@@ -34,4 +34,3 @@ galaxy_info:
|
||||
# Maximum 20 tags per role.
|
||||
|
||||
dependencies: []
|
||||
|
||||
@@ -2,3 +2,4 @@
|
||||
shell: |
|
||||
cmk-update-agent register -H $(hostname -s) --user {{ cmk_username }} \
|
||||
--secret {{ cmk_secret }}
|
||||
changed_when: false
|
||||
|
||||
@@ -29,6 +29,6 @@
|
||||
file:
|
||||
path: /tmp/check-mk-agent.rpm
|
||||
state: absent
|
||||
when: "'check-mk-agent' not in ansible_facts.packages"
|
||||
when: "'check-mk-agent' not in ansible_facts.packages or cmk_force_install"
|
||||
tags:
|
||||
- check_mk_agent
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
- name: Register with CheckMK Update Server
|
||||
win_shell: |
|
||||
C:\ProgramData\checkmk\agent\plugins\cmk-update-agent.exe register -H $env:computername `
|
||||
C:\ProgramData\checkmk\agent\plugins\cmk-update-agent.exe register `
|
||||
-H $env:computername `
|
||||
--user {{ cmk_username }} `
|
||||
--secret {{ cmk_secret }}
|
||||
@@ -20,7 +20,8 @@
|
||||
delegate_to: localhost
|
||||
when: cmk_add_host
|
||||
|
||||
- set_fact:
|
||||
- name: Parse result
|
||||
set_fact:
|
||||
output: "{{ res.content | from_json }}"
|
||||
when: cmk_add_host
|
||||
|
||||
|
||||
Reference in New Issue
Block a user