You've already forked role-check-mk-agent
Fix linting issues
This commit is contained in:
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
|
||||||
@@ -5,7 +5,7 @@ galaxy_info:
|
|||||||
# If the issue tracker for your role is not on github, uncomment the
|
# If the issue tracker for your role is not on github, uncomment the
|
||||||
# next line and provide a value
|
# next line and provide a value
|
||||||
# issue_tracker_url: http://example.com/issue/tracker
|
# issue_tracker_url: http://example.com/issue/tracker
|
||||||
|
|
||||||
license: MIT
|
license: MIT
|
||||||
|
|
||||||
min_ansible_version: 2.9
|
min_ansible_version: 2.9
|
||||||
@@ -34,4 +34,3 @@ galaxy_info:
|
|||||||
# Maximum 20 tags per role.
|
# Maximum 20 tags per role.
|
||||||
|
|
||||||
dependencies: []
|
dependencies: []
|
||||||
|
|
||||||
@@ -2,3 +2,4 @@
|
|||||||
shell: |
|
shell: |
|
||||||
cmk-update-agent register -H $(hostname -s) --user {{ cmk_username }} \
|
cmk-update-agent register -H $(hostname -s) --user {{ cmk_username }} \
|
||||||
--secret {{ cmk_secret }}
|
--secret {{ cmk_secret }}
|
||||||
|
changed_when: false
|
||||||
|
|||||||
@@ -18,10 +18,10 @@
|
|||||||
dest: /tmp/check-mk-agent.rpm
|
dest: /tmp/check-mk-agent.rpm
|
||||||
|
|
||||||
- name: Ensure check_mk_agent installed
|
- name: Ensure check_mk_agent installed
|
||||||
yum:
|
yum:
|
||||||
name: /tmp/check-mk-agent.rpm
|
name: /tmp/check-mk-agent.rpm
|
||||||
state: installed
|
state: installed
|
||||||
notify:
|
notify:
|
||||||
- restart xinetd
|
- restart xinetd
|
||||||
- cmk fresh install
|
- cmk fresh install
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
- name: Register with CheckMK Update Server
|
- name: Register with CheckMK Update Server
|
||||||
win_shell: |
|
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 }} `
|
--user {{ cmk_username }} `
|
||||||
--secret {{ cmk_secret }}
|
--secret {{ cmk_secret }}
|
||||||
@@ -3,13 +3,13 @@
|
|||||||
win_file:
|
win_file:
|
||||||
path: "c:/temp/"
|
path: "c:/temp/"
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: Retrieve copy of agent
|
- name: Retrieve copy of agent
|
||||||
win_get_url:
|
win_get_url:
|
||||||
url: "{{ cmk_msi_agent }}{{ cmk_auth }}"
|
url: "{{ cmk_msi_agent }}{{ cmk_auth }}"
|
||||||
dest: "c:/temp/check-mk-agent.msi"
|
dest: "c:/temp/check-mk-agent.msi"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Ensure agent is installed
|
- name: Ensure agent is installed
|
||||||
win_package:
|
win_package:
|
||||||
path: "c:/temp/check-mk-agent.msi"
|
path: "c:/temp/check-mk-agent.msi"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"ipaddress": "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}"
|
"ipaddress": "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}"
|
||||||
},
|
},
|
||||||
"folder": "{{ cmk_folder | default('Unsorted') }}",
|
"folder": "{{ cmk_folder | default('Unsorted') }}",
|
||||||
"hostname": "{{inventory_hostname}}"
|
"hostname": "{{ inventory_hostname }}"
|
||||||
}
|
}
|
||||||
body_format: raw
|
body_format: raw
|
||||||
return_content: yes
|
return_content: yes
|
||||||
@@ -20,7 +20,8 @@
|
|||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
when: cmk_add_host
|
when: cmk_add_host
|
||||||
|
|
||||||
- set_fact:
|
- name: Parse result
|
||||||
|
set_fact:
|
||||||
output: "{{ res.content | from_json }}"
|
output: "{{ res.content | from_json }}"
|
||||||
when: cmk_add_host
|
when: cmk_add_host
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user