diff --git a/linux/test-listpkgs.yaml b/linux/test-listpkgs.yaml index f3619b3..ac52a5d 100644 --- a/linux/test-listpkgs.yaml +++ b/linux/test-listpkgs.yaml @@ -8,4 +8,19 @@ - name: Print the package facts ansible.builtin.debug: - var: ansible_facts.packages \ No newline at end of file + var: ansible_facts.packages + + - name: Check if a folder exists + stat: + path: /etc/apt + register: aptfolder + + - name: Show if the folder exists + debug: + msg: "APT is on this system" + when: aptfolder.stat.exists + + - name: Show if the folder does not exist + debug: + msg: "APT is on this system" + when: aptfolder.stat.exists == False \ No newline at end of file