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

3
.ansible-lint Normal file
View 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

View File

@@ -5,7 +5,7 @@ galaxy_info:
# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker
license: MIT
min_ansible_version: 2.9
@@ -34,4 +34,3 @@ galaxy_info:
# Maximum 20 tags per role.
dependencies: []

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