Fix linting issues

This commit is contained in:
2020-10-13 23:40:02 +13:00
parent d646952ef5
commit 9d974bdf0c
7 changed files with 14 additions and 9 deletions

View File

@@ -2,3 +2,4 @@
shell: |
cmk-update-agent register -H $(hostname -s) --user {{ cmk_username }} \
--secret {{ cmk_secret }}
changed_when: false

View File

@@ -18,10 +18,10 @@
dest: /tmp/check-mk-agent.rpm
- name: Ensure check_mk_agent installed
yum:
yum:
name: /tmp/check-mk-agent.rpm
state: installed
notify:
notify:
- restart xinetd
- cmk fresh install

View File

@@ -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 }}

View File

@@ -3,13 +3,13 @@
win_file:
path: "c:/temp/"
state: directory
- name: Retrieve copy of agent
win_get_url:
url: "{{ cmk_msi_agent }}{{ cmk_auth }}"
dest: "c:/temp/check-mk-agent.msi"
changed_when: false
- name: Ensure agent is installed
win_package:
path: "c:/temp/check-mk-agent.msi"

View File

@@ -11,7 +11,7 @@
"ipaddress": "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}"
},
"folder": "{{ cmk_folder | default('Unsorted') }}",
"hostname": "{{inventory_hostname}}"
"hostname": "{{ inventory_hostname }}"
}
body_format: raw
return_content: yes
@@ -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