Execution
Date 11 Sep 2024 11:16:32 +0100
Duration 00:00:10.27
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.4
ara 1.7.1 / 1.7.1
Python 3.10.10
Summary
21 Hosts
6 Tasks
63 Results
3 Plays
6 Files
0 Records

File: /home/ssh-gateway/ansible/kuly/test.yaml

---
- name: Ensure plesk_hosts is initialized on localhost
  hosts: localhost
  gather_facts: true
  tasks:
    - name: Ensure plesk_hosts is initialized on localhost
      ansible.builtin.set_fact:
        plesk_hosts: "{{ hostvars['localhost'].plesk_hosts | default([]) }}"
    - name: Show it
      ansible.builtin.debug:
        var: plesk_hosts
- name: Parse
  hosts: all
  roles:
    - plesk
  tasks:
    - name: Apped
      when: plesk_found
      ansible.builtin.set_fact:
        plesk_hosts: "{{ hostvars['localhost'].collected_hostnames | default([]) +  [ansible_facts.hostname]}}"
      delegate_to: localhost

- name: Show it
  hosts: localhost
  tasks:
    - name: Show it
      ansible.builtin.debug:
        var: plesk_hosts