rename dmc12 inventory to cloudlorean and vault admin_password
- replace inventory/dmc12.yml with cloudlorean.yml (+ group_vars) and update all README/AGENTS call examples and the inventory table - move admin_password hash into encrypted vault.yml; remove plaintext copies from roles/bootstrap/defaults and group_vars/external.yml - bootstrap.yml loads vault.yml via vars_files (same pattern as monitoring) - monitoring: PSK config/registration updates, docker role defaults, os-updates logging/reboot refinements, ansible.cfg/execute.sh tweaks - add .project-wiki knowledge base and .github agent instructions
This commit is contained in:
@@ -24,52 +24,36 @@
|
||||
dns: "{{ inventory_hostname }}"
|
||||
port: "{{ monitoring_zabbix_host_interface_port }}"
|
||||
|
||||
- name: Register or update host in Zabbix (monitored by proxy)
|
||||
- name: Register or update host in Zabbix
|
||||
community.zabbix.zabbix_host:
|
||||
server_url: "{{ monitoring_zabbix_api_url }}"
|
||||
login_user: "{{ monitoring_zabbix_api_user }}"
|
||||
login_password: "{{ monitoring_zabbix_api_password }}"
|
||||
validate_certs: "{{ monitoring_zabbix_api_validate_certs }}"
|
||||
host_name: "{{ monitoring_zabbix_host_name }}"
|
||||
visible_name: "{{ monitoring_zabbix_host_name }}"
|
||||
host_groups: "{{ monitoring_zabbix_host_groups }}"
|
||||
link_templates: "{{ monitoring_zabbix_link_templates }}"
|
||||
interfaces: "{{ monitoring_zabbix_interfaces }}"
|
||||
inventory_mode: "{{ monitoring_zabbix_host_inventory_mode }}"
|
||||
monitored_by: proxy
|
||||
proxy: "{{ monitoring_zabbix_proxy }}"
|
||||
monitored_by: "{{ 'proxy' if monitoring_zabbix_proxy | length > 0 else 'zabbix_server' }}"
|
||||
proxy: "{{ monitoring_zabbix_proxy | default(omit) }}"
|
||||
tls_connect: 2
|
||||
tls_accept: 2
|
||||
tls_psk_identity: "{{ monitoring_zabbix_psk_identity }}"
|
||||
tls_psk: "{{ monitoring_zabbix_psk_value }}"
|
||||
status: enabled
|
||||
state: present
|
||||
delegate_to: localhost
|
||||
vars:
|
||||
ansible_network_os: community.zabbix.zabbix
|
||||
ansible_connection: httpapi
|
||||
ansible_host: "{{ (monitoring_zabbix_api_url | urlsplit).hostname }}"
|
||||
ansible_httpapi_port: "{{ (monitoring_zabbix_api_url | urlsplit).port | default(443, true) }}"
|
||||
ansible_httpapi_use_ssl: "{{ (monitoring_zabbix_api_url | urlsplit).scheme == 'https' }}"
|
||||
ansible_httpapi_validate_certs: "{{ monitoring_zabbix_api_validate_certs }}"
|
||||
ansible_zabbix_url_path: >-
|
||||
{{
|
||||
(monitoring_zabbix_api_url | urlsplit).path
|
||||
| regex_replace('^/', '')
|
||||
| regex_replace('/?api_jsonrpc\.php$', '')
|
||||
}}
|
||||
ansible_user: "{{ monitoring_zabbix_api_user }}"
|
||||
ansible_password: "{{ monitoring_zabbix_api_password }}"
|
||||
become: false
|
||||
when:
|
||||
- monitoring_zabbix_register_host | bool
|
||||
- monitoring_zabbix_proxy | length > 0
|
||||
|
||||
- name: Register or update host in Zabbix (monitored by server)
|
||||
community.zabbix.zabbix_host:
|
||||
server_url: "{{ monitoring_zabbix_api_url }}"
|
||||
login_user: "{{ monitoring_zabbix_api_user }}"
|
||||
login_password: "{{ monitoring_zabbix_api_password }}"
|
||||
validate_certs: "{{ monitoring_zabbix_api_validate_certs }}"
|
||||
host_name: "{{ monitoring_zabbix_host_name }}"
|
||||
visible_name: "{{ monitoring_zabbix_host_name }}"
|
||||
host_groups: "{{ monitoring_zabbix_host_groups }}"
|
||||
link_templates: "{{ monitoring_zabbix_link_templates }}"
|
||||
interfaces: "{{ monitoring_zabbix_interfaces }}"
|
||||
inventory_mode: "{{ monitoring_zabbix_host_inventory_mode }}"
|
||||
tls_connect: 2
|
||||
tls_accept: 2
|
||||
tls_psk_identity: "{{ monitoring_zabbix_psk_identity }}"
|
||||
tls_psk: "{{ monitoring_zabbix_psk_value }}"
|
||||
status: enabled
|
||||
state: present
|
||||
delegate_to: localhost
|
||||
become: false
|
||||
when:
|
||||
- monitoring_zabbix_register_host | bool
|
||||
- monitoring_zabbix_proxy | length == 0
|
||||
when: monitoring_zabbix_register_host | bool
|
||||
|
||||
Reference in New Issue
Block a user