added first playbooks
This commit is contained in:
commit
d6a9c3198f
17
apt_update_debian.yml
Normal file
17
apt_update_debian.yml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
- hosts: debian
|
||||||
|
become: true
|
||||||
|
tasks:
|
||||||
|
- name: Update package cache
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
tags: update
|
||||||
|
|
||||||
|
- name: Upgrade all packages
|
||||||
|
apt:
|
||||||
|
upgrade: dist # or "safe" for safe-upgrade, or "full" for full-upgrade
|
||||||
|
tags: update
|
||||||
|
|
||||||
|
- name: Reboot the system if required
|
||||||
|
reboot:
|
||||||
|
when: ansible_reboot_pending
|
||||||
9
apt_update_ubuntu.yml
Normal file
9
apt_update_ubuntu.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
- hosts: ubuntu
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Update apt cache and repositories
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
upgrade: yes
|
||||||
|
autoremove: yes
|
||||||
13
check_user_adexl_exists.yml
Normal file
13
check_user_adexl_exists.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
- hosts: ubuntu
|
||||||
|
become: true
|
||||||
|
tasks:
|
||||||
|
- name: Benutzer adexl prüfen und ggf. anlegen
|
||||||
|
user:
|
||||||
|
name: adexl
|
||||||
|
state: present
|
||||||
|
shell: /bin/bash
|
||||||
|
groups: users
|
||||||
|
append: yes
|
||||||
|
register: user_check
|
||||||
|
ignore_errors: true
|
||||||
10
deploy_ssh_key.yml
Normal file
10
deploy_ssh_key.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
- hosts: ubuntu,debian,raspberry
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
- name: Deploy Ansible SSH-Key
|
||||||
|
authorized_key:
|
||||||
|
user: root
|
||||||
|
key: "{{ lookup('file', '/root/.ssh/id_rsa.pub') }}"
|
||||||
|
path: /root/.ssh/authorized_keys
|
||||||
|
state: present
|
||||||
12
install_checkmk.yml
Normal file
12
install_checkmk.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
become: true
|
||||||
|
roles:
|
||||||
|
- checkmk.general.agent
|
||||||
|
vars:
|
||||||
|
checkmk_agent_server: "192.168.1.11"
|
||||||
|
checkmk_agent_server_port: "8080"
|
||||||
|
checkmk_agent_version: "2.4.0p6"
|
||||||
|
checkmk_agent_site: "cmk"
|
||||||
|
checkmk_agent_auto_activation: true
|
||||||
|
checkmk_agent_server_protocol: http
|
||||||
Loading…
x
Reference in New Issue
Block a user