diff --git a/Jenkinsfile b/Jenkinsfile index bda145c..28ae1df 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,7 +5,7 @@ pipeline { string( name: 'LIMIT', defaultValue: '', - description: 'Limit to specific hosts or groups (e.g., "vms", "lxcs", "zabbix", or hostname) no .lan required' + description: 'Limit to specific hosts or groups (e.g., "vms", "lxcs", "zabbix_targets", or hostname) no .lan required' ) booleanParam( name: 'DRY_RUN', @@ -33,7 +33,7 @@ pipeline { steps { sh ''' echo "Testing dynamic inventory connection..." - ansible-inventory -i inventory/inventory.proxmox.yml --list | head -10 + ansible-inventory -i inventory/inventory.proxmox.yml --graph zabbix_targets ''' } } diff --git a/inventory/inventory.proxmox.yml b/inventory/inventory.proxmox.yml index c0c9e63..16f5c4e 100644 --- a/inventory/inventory.proxmox.yml +++ b/inventory/inventory.proxmox.yml @@ -19,7 +19,7 @@ groups: update_targets: "'update' in (proxmox_tags | default([]))" docker_hosts: "'docker' in (proxmox_tags | default([]))" kubernetes: "'k8s' in (proxmox_tags | default([]))" - zabbix: "'zabbix' in (proxmox_tags | default([]))" + zabbix_targets: "'zabbix' in (proxmox_tags | default([]))" compose: ansible_host: name + '.lan' diff --git a/playbooks/install_zabbix.yml b/playbooks/install_zabbix.yml index b5d5995..a854565 100644 --- a/playbooks/install_zabbix.yml +++ b/playbooks/install_zabbix.yml @@ -1,6 +1,6 @@ --- - name: Install Zabbix Agent2 on tagged Proxmox hosts - hosts: zabbix + hosts: zabbix_targets become: true gather_facts: true