-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpodman-cmk.yml
56 lines (48 loc) · 1.38 KB
/
podman-cmk.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
- hosts: test
become: yes
vars:
cmk_url: https://download.checkmk.com/checkmk/2.0.0p20/check-mk-free-docker-2.0.0p20.tar.gz
cmk_dest: /tmp/
cmk_filename: check-mk
tasks:
- name: Check podman
yum:
name: podman
state: present
- name: Enable Podmanan
service:
name: podman
state: started
enabled: yes
- name: Download cmk image
get_url:
url: "{{ cmk_url }}"
dest: "{{ cmk_dest }}/{{ cmk_filename }}.tar.gz" #/tmp/check-mk-free-docker-2.0.0p20.tar.gz
mode: '0640'
# - name: Copy cmk image to tmp from controler node
# ansible.builtin.copy:
# src: /tmp/cmk/check-mk-free-docker-2.0.0p20.tar.gz
# dest: /tmp/check-mk-free-docker-2.0.0p20.tar.gz
# remote_src: yes
- name: Load cmk image
containers.podman.podman_load:
input: "{{ cmk_dest }}/{{ cmk_filename }}.tar.gz"
- name: Run container
containers.podman.podman_container:
name: monitoring
image: localhost/checkmk/check-mk-free:2.0.0p20
state: started
ports: 8080:5000
detach: yes
interactive: yes
# tmpfs: {}
volume: monitoring:/omd/sites
timezone: Africa/Maputo
restart_policy: always
- name: Get default password
shell: podman container logs monitoring | grep 'password:'
register: cmkadmin
- name: Print Passwd
debug:
var: cmkadmin.stdout