jenkins localhost fix and ubuntu version fix
This commit is contained in:
5
inventory/host_vars/jenkins.yml
Normal file
5
inventory/host_vars/jenkins.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
# The Jenkins controller installs the agent on itself locally
|
||||||
|
# rather than SSHing back into the machine running the playbook
|
||||||
|
ansible_connection: local
|
||||||
|
ansible_host: localhost
|
||||||
@@ -22,8 +22,5 @@ groups:
|
|||||||
zabbix_targets: "'zabbix' in (proxmox_tags | default([]))"
|
zabbix_targets: "'zabbix' in (proxmox_tags | default([]))"
|
||||||
|
|
||||||
compose:
|
compose:
|
||||||
# If this host's Proxmox name matches the controller's hostname, connect locally
|
ansible_host: name + '.lan'
|
||||||
# instead of SSHing back into the machine running the playbook
|
|
||||||
ansible_connection: "'local' if name == lookup('pipe', 'hostname') else 'ssh'"
|
|
||||||
ansible_host: "lookup('pipe', 'hostname') if name == lookup('pipe', 'hostname') else name + '.lan'"
|
|
||||||
ansible_user: 'jenkins'
|
ansible_user: 'jenkins'
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
---
|
---
|
||||||
# Install tasks
|
# Install tasks
|
||||||
|
- name: Resolve supported Ubuntu version for Zabbix repository
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
zabbix_ubuntu_repo_version: "{{ ansible_distribution_version if ansible_distribution_version is version('25.00', '<') else '24.04' }}"
|
||||||
|
when: zabbix_state == 'present'
|
||||||
|
|
||||||
- name: Download Zabbix repository package
|
- name: Download Zabbix repository package
|
||||||
ansible.builtin.get_url:
|
ansible.builtin.get_url:
|
||||||
url: "https://repo.zabbix.com/zabbix/{{ zabbix_version }}/ubuntu/pool/main/z/zabbix-release/zabbix-release_{{ zabbix_release }}+ubuntu{{ ansible_distribution_version }}_all.deb"
|
url: "https://repo.zabbix.com/zabbix/{{ zabbix_version }}/ubuntu/pool/main/z/zabbix-release/zabbix-release_{{ zabbix_release }}+ubuntu{{ zabbix_ubuntu_repo_version }}_all.deb"
|
||||||
dest: /tmp/zabbix-release.deb
|
dest: /tmp/zabbix-release.deb
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
when: zabbix_state == 'present'
|
when: zabbix_state == 'present'
|
||||||
|
|||||||
Reference in New Issue
Block a user