diff --git a/Inventories/test/host_vars/ansible-test02.yml b/Inventories/test/host_vars/ansible-test02.yml index 37ebf19..e1a3575 100644 --- a/Inventories/test/host_vars/ansible-test02.yml +++ b/Inventories/test/host_vars/ansible-test02.yml @@ -9,3 +9,23 @@ dns_servers: - 8.8.8.8 new_hostname: "ansible-test02" timezone: "Europe/Berlin" +required_pkgs: + - ufw + - fail2ban + - net-tools + - p7zip-full + - pigz + - htop + - iotop + - bash-completion + - rsync + - sudo + - nano + - vim + - screen + - curl + - gnupg2 + - apache2-utils + - mariadb-client + - git + - sshpass \ No newline at end of file diff --git a/ansible-required_pkgs.yml b/ansible-required_pkgs.yml new file mode 100644 index 0000000..fc17b9f --- /dev/null +++ b/ansible-required_pkgs.yml @@ -0,0 +1,15 @@ +--- +- name: Install multiple packages + hosts: all + become: true + + tasks: + - name: Update apt cache + ansible.builtin.apt: + update_cache: yes + cache_valid_time: 3600 # Cache für eine Stunde gültig + + - name: Install required packages + ansible.builtin.apt: + name: "{{ required_pkgs }}" + state: present