check.yaml: add logic for printing all .dpkg-* files
Some checks failed
/ Ansible Lint (push) Failing after 1m40s

This commit is contained in:
June 2024-11-23 01:48:49 +01:00
parent dc0017c79a
commit dffb5e307a
Signed by: june
SSH key fingerprint: SHA256:o9EAq4Y9N9K0pBQeBTqhSDrND5E7oB+60ZNx0U1yPe0

View file

@ -5,3 +5,27 @@
- name: Print OS distribution and version - name: Print OS distribution and version
ansible.builtin.debug: ansible.builtin.debug:
msg: "{{ ansible_facts['distribution'] }} {{ ansible_facts['distribution_version'] }} ({{ ansible_facts['distribution_release'] }})" msg: "{{ ansible_facts['distribution'] }} {{ ansible_facts['distribution_version'] }} ({{ ansible_facts['distribution_release'] }})"
- name: Find all .dpkg-* files
ansible.builtin.find:
paths: /etc
file_type: file
recurse: true
use_regex: false
patterns:
- "*.dpkg-*"
become: true
register: check__dpkg_files
- name: Create variable for list of all .dpkg-* files
ansible.builtin.set_fact:
check__dpkg_files_list: [ ]
- name: Populate list of all .dpkg-* files
ansible.builtin.set_fact:
check__dpkg_files_list: "{{ check__dpkg_files_list + [ item.path ] }}"
loop: "{{ check__dpkg_files.files }}"
- name: Print .dpkg-* files list
ansible.builtin.debug:
var: check__dpkg_files_list