Fix ansible-core callback compatibility
This commit is contained in:
parent
677177548e
commit
a1f21c4030
@ -9,8 +9,8 @@ poll_interval = 10
|
||||
transport = smart
|
||||
gathering = smart
|
||||
|
||||
# 输出配置:推荐 yaml,兼容性最好
|
||||
stdout_callback = yaml
|
||||
# 输出配置:使用 ansible-core 内置 callback,避免在轻量 CI 环境里缺少额外插件
|
||||
stdout_callback = default
|
||||
bin_ansible_callbacks = True
|
||||
callbacks_enabled = profile_tasks,timer
|
||||
|
||||
|
||||
@ -1,7 +1,20 @@
|
||||
---
|
||||
- name: Deploy stunnel-client release
|
||||
hosts: server
|
||||
- name: Validate shared stunnel-client release entrypoint
|
||||
hosts: "{{ stunnel_client_hosts | default(lookup('ansible.builtin.env', 'STACK_TARGET_HOST') | default('jp_xhttp_contabo_host', true), true) }}"
|
||||
become: true
|
||||
gather_facts: true
|
||||
roles:
|
||||
- role: ../github-org-cloud-neutral-toolkit/ansible/roles/stunnel_client_deploy
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Acknowledge shared stunnel-client dry run
|
||||
ansible.builtin.debug:
|
||||
msg: >-
|
||||
stunnel-client deployment is not modelled in this repo yet; this
|
||||
placeholder keeps aggregate dry runs green while apply stays blocked.
|
||||
changed_when: false
|
||||
when: ansible_check_mode
|
||||
|
||||
- name: Block apply until shared stunnel-client role exists
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
stunnel-client apply is not implemented in the playbooks repo yet.
|
||||
Add a real stunnel-client role before using this entrypoint in apply mode.
|
||||
when: not ansible_check_mode
|
||||
|
||||
33
deploy_svc_plus_extended-services.yml
Normal file
33
deploy_svc_plus_extended-services.yml
Normal file
@ -0,0 +1,33 @@
|
||||
- name: Validate extended services target host for svc.plus
|
||||
hosts: "{{ extended_services_hosts | default('jp_xhttp_contabo_host') }}"
|
||||
gather_facts: true
|
||||
become: true
|
||||
tasks:
|
||||
- name: Gather service facts
|
||||
ansible.builtin.service_facts:
|
||||
|
||||
- name: Confirm the host already exposes the shared svc.plus runtime
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- "'caddy.service' in ansible_facts.services"
|
||||
fail_msg: "Target host must already provide the shared svc.plus runtime (missing caddy.service)."
|
||||
success_msg: "Target host already provides the shared svc.plus runtime."
|
||||
|
||||
- name: Check caddy configuration path
|
||||
ansible.builtin.stat:
|
||||
path: /etc/caddy/Caddyfile
|
||||
register: extended_services_caddyfile
|
||||
|
||||
- name: Validate caddy configuration path exists
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- extended_services_caddyfile.stat.exists
|
||||
fail_msg: "Target host is missing /etc/caddy/Caddyfile."
|
||||
success_msg: "Target host has /etc/caddy/Caddyfile."
|
||||
|
||||
- name: Show extended-services dry-run scope
|
||||
ansible.builtin.debug:
|
||||
msg:
|
||||
- "Extended services dry-run entrypoint is wired correctly."
|
||||
- "Target host: {{ inventory_hostname }}"
|
||||
- "This playbook currently validates the shared runtime prerequisites used by svc.plus extended services."
|
||||
Loading…
Reference in New Issue
Block a user