add var to task

This commit is contained in:
Ruben Blanco 2023-10-18 14:33:17 +02:00
parent 69a6a4f548
commit e9a9533a14
1 changed files with 5 additions and 0 deletions

View File

@ -8,6 +8,11 @@
ansible.builtin.package_facts: ansible.builtin.package_facts:
manager: auto manager: auto
# print the package facts in var
- name: print the package facts in var
ansible.builtin.debug:
var: ansible_facts.packages
# install packages if is not in the system # install packages if is not in the system
- name: install fail2ban package if is not in the system - name: install fail2ban package if is not in the system
apt: apt: