Skip to content

Latest commit

 

History

History
45 lines (27 loc) · 853 Bytes

packages-ex3.rst

File metadata and controls

45 lines (27 loc) · 853 Bytes

Example 3: Remove packages

Remove packages listed in lp_packages_remove

Create playbook

shell> cat lp.yml
- hosts: test_01
  become: true
  roles:
    - vbotka.linux_postinstall

Create variables

Create the file host_vars/test_01/lp-packages.yml and declare the list of packages lp_packages_remove

shell> cat host_vars/test_01/lp-packages.yml
lp_packages_remove:
  - zeitgeist

Show variables

Display the variables:

shell> ansible-playbook lp.yml -t lp_packages_debug -e lp_packages_debug=True

Remove packages listed in lp_packages_remove

examples/packages-ex3-remove.yaml.example