Merge branch 'master' of ssh://gitlab.social.my-wan.de:22422/rene/ansible-pull

This commit is contained in:
2022-07-02 16:48:26 +02:00
4 changed files with 26 additions and 2 deletions

2
host_vars/pve Normal file
View File

@@ -0,0 +1,2 @@
---
is_proxmox: true

3
hosts
View File

@@ -4,6 +4,9 @@ VM-debian11-template
[cluster:children] [cluster:children]
glustertest glustertest
[server]
pve
[server:children] [server:children]
cluster cluster
database database

View File

@@ -4,6 +4,7 @@
state: latest state: latest
name: name:
- curl - curl
- dmidecode
- htop - htop
- iftop - iftop
- iotop - iotop
@@ -12,6 +13,7 @@
- neofetch - neofetch
- net-tools - net-tools
- "{{ nfs_client_package }}" - "{{ nfs_client_package }}"
- python3-netaddr
- ranger - ranger
- rsync - rsync
- tmux - tmux
@@ -21,7 +23,6 @@
- vim-python-jedi - vim-python-jedi
- wget - wget
- unattended-upgrades - unattended-upgrades
- python3-netaddr
- name: system setup | utilities | install cloud-init and gemu guest agent - name: system setup | utilities | install cloud-init and gemu guest agent
tags: packages,system,system setup tags: packages,system,system setup

View File

@@ -57,7 +57,7 @@
- name: server | snmpd | copy distro script - name: server | snmpd | copy distro script
copy: copy:
dest: "/etc/snmp/distro/" dest: "/etc/snmp/distro"
src: "distro" src: "distro"
mode: "0755" mode: "0755"
@@ -82,6 +82,24 @@
- { service: "manufacturer", script: "/bin/cat /sys/devices/virtual/dmi/id/sys_vendor" } - { service: "manufacturer", script: "/bin/cat /sys/devices/virtual/dmi/id/sys_vendor" }
- { service: "serial", script: "/bin/cat /sys/devices/virtual/dmi/id/product_serial" } - { service: "serial", script: "/bin/cat /sys/devices/virtual/dmi/id/product_serial" }
- block:
- name: server | snmpd | get proxmox script
get_url:
url: "https://raw.githubusercontent.com/librenms/librenms-agent/master/agent-local/proxmox"
dest: "/usr/local/bin/proxmox"
mode: "0755"
owner: "root"
group: "root"
- name: server | snmpd | configure proxmox extends
lineinfile:
path: "{{ snmpd_conf }}"
state: present
line: "extend proxmox {{ sudo }} /usr/local/bin/proxmox"
insertafter: "# SECTION: custom settings"
when:
- is_proxmox is defined
- is_proxmox == true
- name: server | snmpd start service - name: server | snmpd start service
service: service:
name: "snmpd" name: "snmpd"