Browse Source

update

master
Dirk Wirts 2 years ago
parent
commit
c1e7ad9309
  1. 20
      Inventories/test/host_vars/ansible-test02.yml
  2. 15
      ansible-required_pkgs.yml

20
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

15
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
Loading…
Cancel
Save