{"id":5812,"sha1":"87b10e52736f56ecb4bdc84179a97ad30317cfe6","playbook":{"id":3692,"items":{"plays":1,"tasks":6,"results":6,"hosts":2,"files":1,"records":0},"arguments":{"version":null,"verbosity":2,"private_key_file":"/home/ssh-gateway/.ssh/id_rsa","remote_user":"root","connection":"ssh","timeout":null,"ssh_common_args":null,"sftp_extra_args":null,"scp_extra_args":null,"ssh_extra_args":null,"ask_pass":false,"connection_password_file":null,"force_handlers":false,"flush_cache":false,"become":false,"become_method":"sudo","become_user":null,"become_ask_pass":false,"become_password_file":null,"tags":["all"],"skip_tags":[],"check":false,"diff":false,"inventory":["/home/ssh-gateway/ansible/kuly/bash-kvm-inventory-dev.sh"],"listhosts":false,"subset":"popular-flamingo.man-1.solus.stage.town","extra_vars":"Not saved by ARA as configured by 'ignored_arguments'","vault_ids":[],"ask_vault_pass":false,"vault_password_files":[],"forks":20,"module_path":null,"syntax":false,"listtasks":false,"listtags":false,"step":false,"start_at_task":null,"args":["find_snowflakes_repos.yaml"]},"labels":[{"id":1,"name":"remote_user:root"},{"id":2,"name":"check:False"},{"id":3,"name":"tags:all"},{"id":182,"name":"subset:popular-flamingo.man-1.solus.stage.town"}],"started":"2025-09-11T13:30:19.873396+01:00","ended":"2025-09-11T13:30:22.050819+01:00","duration":"00:00:02.177423","name":null,"ansible_version":"2.16.11","client_version":"1.7.3","python_version":"3.10.10","server_version":"1.7.3","status":"completed","path":"/home/ssh-gateway/ansible/kuly/find_snowflakes_repos.yaml","controller":"ssh-gw-4.layershift.com","user":"root"},"content":"---\n- name: Check for 3rd-party enabled repositories (Pure Ansible)\n  hosts: all\n  become: true\n  strategy: linear\n  vars:\n    allowed_repos:\n      - baseos\n      - appstream\n      - extras\n      - powertools\n      - devel\n      - ha\n      - resilientstorage\n      - sap\n      - sap-hana\n      - epel\n      - epel-modular\n      - layershift\n\n  tasks:\n    - name: Get list of enabled repos\n      ansible.builtin.command: dnf repolist --enabled --quiet\n      register: repolist\n      changed_when: false\n\n    - name: Parse enabled repo IDs\n      ansible.builtin.set_fact:\n        enabled_repos: >-\n          {{\n            repolist.stdout_lines[1:]\n            | map('regex_replace', '^([^ ]+).*', '\\1')\n            | list\n            | map('trim')\n            | reject('eq', '')\n            | list\n          }}\n\n    - name: Identify 3rd-party repos\n      ansible.builtin.set_fact:\n        thirdparty_repos: \"{{ enabled_repos | difference(allowed_repos) }}\"\n\n    - name: Register report data\n      ansible.builtin.set_fact:\n        snowflake_report_item:\n          host: \"{{ inventory_hostname }}\"\n          thirdparty_repos: \"{{ thirdparty_repos }}\"\n\n    - name: Aggregate all reports (run once on first host)\n      ansible.builtin.set_fact:\n        snowflake_reports: >-\n          {{\n            (snowflake_reports | default([])) + [hostvars[item].snowflake_report_item]\n          }}\n      delegate_to: localhost\n      run_once: true\n      when: inventory_hostname == ansible_play_hosts_all[0]\n      loop: \"{{ ansible_play_hosts_all }}\"\n\n    - name: Display JSON report\n      ansible.builtin.debug:\n        msg: \"{{ snowflake_reports | to_nice_json }}\"\n      changed_when: >-\n        snowflake_reports is defined and\n        snowflake_reports | selectattr('thirdparty_repos', '!=', []) | list | length > 0\n      delegate_to: localhost\n      run_once: true\n      when: inventory_hostname == ansible_play_hosts_all[0]\n","created":"2025-09-11T13:30:19.904691+01:00","updated":"2025-09-11T13:30:19.904714+01:00","path":"/home/ssh-gateway/ansible/kuly/find_snowflakes_repos.yaml"}