Skip to content

Commit e83c50e

Browse files
committed
Rename authentication variables.
1 parent 04e0dfc commit e83c50e

File tree

106 files changed

+1182
-1162
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+1182
-1162
lines changed

Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,26 @@ tests-sanity: vm
153153

154154
tests-units: vm
155155
@vagrant ssh collection -c "\
156+
export LC_ALL=C.UTF-8 && \
156157
cd $(COLLECTION_ROOT) && \
157158
uv run ansible-test units --docker"
158159

160+
tests-molecule: tests-molecule-agent tests-molecule-server
161+
162+
tests-molecule-agent: vm
163+
@vagrant ssh collection -c "\
164+
export LC_ALL=C.UTF-8 && \
165+
cd $(COLLECTION_ROOT)/roles/agent/ && \
166+
uv run molecule test -s 2.4.0"
167+
168+
tests-molecule-server: vm
169+
@vagrant ssh collection -c "\
170+
export LC_ALL=C.UTF-8 && \
171+
cd $(COLLECTION_ROOT)/roles/server/ && \
172+
uv run molecule test -s 2.4.0"
173+
159174
tests-integration: vm
160175
@vagrant ssh collection -c "\
176+
export LC_ALL=C.UTF-8 && \
161177
cd $(COLLECTION_ROOT) && \
162178
uv run ansible-test integration --docker"

USAGE.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ We encourage you - in accordance with Ansible Best Practices - to always use **F
1717
checkmk.general.activation:
1818
server_url: "http://myserver/"
1919
site: "mysite"
20-
automation_user: "myuser"
21-
automation_secret: "mysecret"
20+
api_user: "myuser"
21+
api_secret: "mysecret"
2222
force_foreign_changes: true
2323
sites:
2424
- "mysite"
@@ -28,7 +28,7 @@ We encourage you - in accordance with Ansible Best Practices - to always use **F
2828

2929
## Specifying common parameters
3030

31-
When using multiple modules from this collection, you'll often need to provide the same parameters (like `server_url`, `site`, `automation_user`, and `automation_secret`) repeatedly. The following sections show several ways Ansible offers to avoid repetition and keep your playbooks clean.
31+
When using multiple modules from this collection, you'll often need to provide the same parameters (like `server_url`, `site`, `api_user`, and `api_secret`) repeatedly. The following sections show several ways Ansible offers to avoid repetition and keep your playbooks clean.
3232

3333
### `module_defaults`
3434

@@ -41,8 +41,8 @@ You can set default values for module parameters at the play level. These defaul
4141
group/checkmk.general.checkmk:
4242
server_url: "http://myserver/"
4343
site: "mysite"
44-
automation_user: "myuser"
45-
automation_secret: "mysecret"
44+
api_user: "myuser"
45+
api_secret: "mysecret"
4646

4747
tasks:
4848
- name: "Run activation."
@@ -71,8 +71,8 @@ Ansible can read variables from an INI file (e.g., `ansible.cfg` or a custom fil
7171
[checkmk]
7272
server_url = http://myserver/
7373
site = mysite
74-
automation_user = myuser
75-
automation_secret = mysecret
74+
api_user = myuser
75+
api_secret = mysecret
7676
```
7777

7878
-----
@@ -115,8 +115,8 @@ This example demonstrates how to create or update a host in Checkmk:
115115
checkmk.general.host:
116116
server_url: "http://myserver/"
117117
site: "mysite"
118-
automation_user: "myuser"
119-
automation_secret: "mysecret"
118+
api_user: "myuser"
119+
api_secret: "mysecret"
120120
host_name: "myhost"
121121
folder: "/"
122122
attributes:
@@ -144,8 +144,8 @@ This example shows how to query the Checkmk site version and display it. This ca
144144
server_url=my_url,
145145
site=mysite,
146146
validate_certs=False,
147-
automation_user=myuser,
148-
automation_secret=mysecret
147+
api_user=myuser,
148+
api_secret=mysecret
149149
)}}"
150150

151151
- name: "Print Checkmk version."
@@ -167,8 +167,8 @@ To use the plugin, create a YAML file (e.g., `checkmk.yml`) with the following c
167167
plugin: checkmk.general.checkmk
168168
server_url: "http://myserver/"
169169
site: "mysite"
170-
automation_user: "myuser"
171-
automation_secret: "mysecret"
170+
api_user: "myuser"
171+
api_secret: "mysecret"
172172
# Group the hosts based on the following elements
173173
groupsources: ["hosttags", "sites"]
174174
```

playbooks/demo/dcd.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
folder:
2020
server_url: "{{ checkmk_var_server_url }}"
2121
site: "{{ checkmk_var_site }}"
22-
automation_user: "{{ checkmk_var_automation_user }}"
23-
automation_secret: "{{ checkmk_var_automation_secret }}"
22+
api_user: "{{ checkmk_var_api_user }}"
23+
api_secret: "{{ checkmk_var_api_secret }}"
2424
path: "{{ item.path }}"
2525
name: "{{ item.name }}"
2626
state: "present"
@@ -32,8 +32,8 @@
3232
host:
3333
server_url: "{{ checkmk_var_server_url }}"
3434
site: "{{ checkmk_var_site }}"
35-
automation_user: "{{ checkmk_var_automation_user }}"
36-
automation_secret: "{{ checkmk_var_automation_secret }}"
35+
api_user: "{{ checkmk_var_api_user }}"
36+
api_secret: "{{ checkmk_var_api_secret }}"
3737
name: "{{ inventory_hostname }}"
3838
folder: "{{ checkmk_var_folder_path }}"
3939
attributes:
@@ -46,8 +46,8 @@
4646
dcd:
4747
server_url: "{{ checkmk_var_server_url }}"
4848
site: "{{ checkmk_var_site }}"
49-
automation_user: "{{ checkmk_var_automation_user }}"
50-
automation_secret: "{{ checkmk_var_automation_secret }}"
49+
api_user: "{{ checkmk_var_api_user }}"
50+
api_secret: "{{ checkmk_var_api_secret }}"
5151
dcd_config: "{{ item }}"
5252
state: "present"
5353
loop: "{{ checkmk_var_dcd }}"
@@ -65,8 +65,8 @@
6565
activation:
6666
server_url: "{{ checkmk_var_server_url }}"
6767
site: "{{ checkmk_var_site }}"
68-
automation_user: "{{ checkmk_var_automation_user }}"
69-
automation_secret: "{{ checkmk_var_automation_secret }}"
68+
api_user: "{{ checkmk_var_api_user }}"
69+
api_secret: "{{ checkmk_var_api_secret }}"
7070
force_foreign_changes: 'true'
7171
sites:
7272
- "{{ checkmk_var_site }}"
@@ -77,8 +77,8 @@
7777
dcd:
7878
server_url: "{{ checkmk_var_server_url }}"
7979
site: "{{ checkmk_var_site }}"
80-
automation_user: "{{ checkmk_var_automation_user }}"
81-
automation_secret: "{{ checkmk_var_automation_secret }}"
80+
api_user: "{{ checkmk_var_api_user }}"
81+
api_secret: "{{ checkmk_var_api_secret }}"
8282
dcd_config: "{{ item }}"
8383
state: "absent"
8484
loop: "{{ checkmk_var_dcd }}"
@@ -89,8 +89,8 @@
8989
host:
9090
server_url: "{{ checkmk_var_server_url }}"
9191
site: "{{ checkmk_var_site }}"
92-
automation_user: "{{ checkmk_var_automation_user }}"
93-
automation_secret: "{{ checkmk_var_automation_secret }}"
92+
api_user: "{{ checkmk_var_api_user }}"
93+
api_secret: "{{ checkmk_var_api_secret }}"
9494
name: "{{ inventory_hostname }}"
9595
folder: "{{ checkmk_var_folder_path }}"
9696
state: "absent"
@@ -100,8 +100,8 @@
100100
folder:
101101
server_url: "{{ checkmk_var_server_url }}"
102102
site: "{{ checkmk_var_site }}"
103-
automation_user: "{{ checkmk_var_automation_user }}"
104-
automation_secret: "{{ checkmk_var_automation_secret }}"
103+
api_user: "{{ checkmk_var_api_user }}"
104+
api_secret: "{{ checkmk_var_api_secret }}"
105105
path: "{{ item.path }}"
106106
name: "{{ item.name }}"
107107
state: "absent"
@@ -120,8 +120,8 @@
120120
activation:
121121
server_url: "{{ checkmk_var_server_url }}"
122122
site: "{{ checkmk_var_site }}"
123-
automation_user: "{{ checkmk_var_automation_user }}"
124-
automation_secret: "{{ checkmk_var_automation_secret }}"
123+
api_user: "{{ checkmk_var_api_user }}"
124+
api_secret: "{{ checkmk_var_api_secret }}"
125125
force_foreign_changes: 'true'
126126
sites:
127127
- "{{ checkmk_var_site }}"

playbooks/demo/downtimes.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
folder:
1212
server_url: "{{ checkmk_var_server_url }}"
1313
site: "{{ checkmk_var_site }}"
14-
automation_user: "{{ checkmk_var_automation_user }}"
15-
automation_secret: "{{ checkmk_var_automation_secret }}"
14+
api_user: "{{ checkmk_var_api_user }}"
15+
api_secret: "{{ checkmk_var_api_secret }}"
1616
path: "{{ item.path }}"
1717
name: "{{ item.name }}"
1818
state: "present"
@@ -24,8 +24,8 @@
2424
host:
2525
server_url: "{{ checkmk_var_server_url }}"
2626
site: "{{ checkmk_var_site }}"
27-
automation_user: "{{ checkmk_var_automation_user }}"
28-
automation_secret: "{{ checkmk_var_automation_secret }}"
27+
api_user: "{{ checkmk_var_api_user }}"
28+
api_secret: "{{ checkmk_var_api_secret }}"
2929
name: "{{ inventory_hostname }}"
3030
folder: "{{ checkmk_var_folder_path }}"
3131
attributes:
@@ -38,8 +38,8 @@
3838
activation:
3939
server_url: "{{ checkmk_var_server_url }}"
4040
site: "{{ checkmk_var_site }}"
41-
automation_user: "{{ checkmk_var_automation_user }}"
42-
automation_secret: "{{ checkmk_var_automation_secret }}"
41+
api_user: "{{ checkmk_var_api_user }}"
42+
api_secret: "{{ checkmk_var_api_secret }}"
4343
force_foreign_changes: true
4444
sites:
4545
- "{{ checkmk_var_site }}"
@@ -50,8 +50,8 @@
5050
downtime:
5151
server_url: "{{ checkmk_var_server_url }}"
5252
site: "{{ checkmk_var_site }}"
53-
automation_user: "{{ checkmk_var_automation_user }}"
54-
automation_secret: "{{ checkmk_var_automation_secret }}"
53+
api_user: "{{ checkmk_var_api_user }}"
54+
api_secret: "{{ checkmk_var_api_secret }}"
5555
host_name: "{{ inventory_hostname }}"
5656
comment: downtime 1 - on services with relative timestamps
5757
start_after:
@@ -69,8 +69,8 @@
6969
downtime:
7070
server_url: "{{ checkmk_var_server_url }}"
7171
site: "{{ checkmk_var_site }}"
72-
automation_user: "{{ checkmk_var_automation_user }}"
73-
automation_secret: "{{ checkmk_var_automation_secret }}"
72+
api_user: "{{ checkmk_var_api_user }}"
73+
api_secret: "{{ checkmk_var_api_secret }}"
7474
host_name: "{{ inventory_hostname }}"
7575
comment: downtime 2 - on services with absolute timestamps
7676
start_time: "2024-03-25T20:39:28Z"
@@ -84,8 +84,8 @@
8484
downtime:
8585
server_url: "{{ checkmk_var_server_url }}"
8686
site: "{{ checkmk_var_site }}"
87-
automation_user: "{{ checkmk_var_automation_user }}"
88-
automation_secret: "{{ checkmk_var_automation_secret }}"
87+
api_user: "{{ checkmk_var_api_user }}"
88+
api_secret: "{{ checkmk_var_api_secret }}"
8989
host_name: "{{ inventory_hostname }}"
9090
comment: downtime 3 - on services without timestamps
9191
service_descriptions:
@@ -99,8 +99,8 @@
9999
downtime:
100100
server_url: "{{ checkmk_var_server_url }}"
101101
site: "{{ checkmk_var_site }}"
102-
automation_user: "{{ checkmk_var_automation_user }}"
103-
automation_secret: "{{ checkmk_var_automation_secret }}"
102+
api_user: "{{ checkmk_var_api_user }}"
103+
api_secret: "{{ checkmk_var_api_secret }}"
104104
host_name: "{{ inventory_hostname }}"
105105
comment: downtime 4 - on host with relative timestamps
106106
start_after:
@@ -115,8 +115,8 @@
115115
downtime:
116116
server_url: "{{ checkmk_var_server_url }}"
117117
site: "{{ checkmk_var_site }}"
118-
automation_user: "{{ checkmk_var_automation_user }}"
119-
automation_secret: "{{ checkmk_var_automation_secret }}"
118+
api_user: "{{ checkmk_var_api_user }}"
119+
api_secret: "{{ checkmk_var_api_secret }}"
120120
host_name: "{{ inventory_hostname }}"
121121
comment: downtime 5 - on host with absolute timestamps
122122
start_time: "2024-03-25T20:39:28Z"
@@ -127,8 +127,8 @@
127127
downtime:
128128
server_url: "{{ checkmk_var_server_url }}"
129129
site: "{{ checkmk_var_site }}"
130-
automation_user: "{{ checkmk_var_automation_user }}"
131-
automation_secret: "{{ checkmk_var_automation_secret }}"
130+
api_user: "{{ checkmk_var_api_user }}"
131+
api_secret: "{{ checkmk_var_api_secret }}"
132132
host_name: "{{ inventory_hostname }}"
133133
comment: downtime 6 - on host without timestamps
134134
delegate_to: localhost
@@ -144,8 +144,8 @@
144144
downtime:
145145
server_url: "{{ checkmk_var_server_url }}"
146146
site: "{{ checkmk_var_site }}"
147-
automation_user: "{{ checkmk_var_automation_user }}"
148-
automation_secret: "{{ checkmk_var_automation_secret }}"
147+
api_user: "{{ checkmk_var_api_user }}"
148+
api_secret: "{{ checkmk_var_api_secret }}"
149149
host_name: "{{ inventory_hostname }}"
150150
service_descriptions:
151151
- "Check_MK"
@@ -157,8 +157,8 @@
157157
downtime:
158158
server_url: "{{ checkmk_var_server_url }}"
159159
site: "{{ checkmk_var_site }}"
160-
automation_user: "{{ checkmk_var_automation_user }}"
161-
automation_secret: "{{ checkmk_var_automation_secret }}"
160+
api_user: "{{ checkmk_var_api_user }}"
161+
api_secret: "{{ checkmk_var_api_secret }}"
162162
host_name: "{{ inventory_hostname }}"
163163
state: absent
164164
delegate_to: localhost
@@ -174,8 +174,8 @@
174174
host:
175175
server_url: "{{ checkmk_var_server_url }}"
176176
site: "{{ checkmk_var_site }}"
177-
automation_user: "{{ checkmk_var_automation_user }}"
178-
automation_secret: "{{ checkmk_var_automation_secret }}"
177+
api_user: "{{ checkmk_var_api_user }}"
178+
api_secret: "{{ checkmk_var_api_secret }}"
179179
name: "{{ inventory_hostname }}"
180180
folder: "{{ checkmk_var_folder_path }}"
181181
state: "absent"
@@ -185,8 +185,8 @@
185185
folder:
186186
server_url: "{{ checkmk_var_server_url }}"
187187
site: "{{ checkmk_var_site }}"
188-
automation_user: "{{ checkmk_var_automation_user }}"
189-
automation_secret: "{{ checkmk_var_automation_secret }}"
188+
api_user: "{{ checkmk_var_api_user }}"
189+
api_secret: "{{ checkmk_var_api_secret }}"
190190
path: "{{ item.path }}"
191191
name: "{{ item.name }}"
192192
state: "absent"
@@ -198,8 +198,8 @@
198198
activation:
199199
server_url: "{{ checkmk_var_server_url }}"
200200
site: "{{ checkmk_var_site }}"
201-
automation_user: "{{ checkmk_var_automation_user }}"
202-
automation_secret: "{{ checkmk_var_automation_secret }}"
201+
api_user: "{{ checkmk_var_api_user }}"
202+
api_secret: "{{ checkmk_var_api_secret }}"
203203
force_foreign_changes: true
204204
sites:
205205
- "{{ checkmk_var_site }}"

0 commit comments

Comments
 (0)