From 3d934850708203c2c49f4bfd435cbcb2bdb8fe84 Mon Sep 17 00:00:00 2001 From: az Date: Wed, 8 May 2024 12:21:19 +0200 Subject: [PATCH] playbook.yml aktualisiert --- playbook.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/playbook.yml b/playbook.yml index dd07b3f..c8552ae 100644 --- a/playbook.yml +++ b/playbook.yml @@ -2,7 +2,7 @@ - name: ensure safe environment for exams hosts: localhost vars: - - config_ufw: false + - config_ufw: true # to verify ufw configuration run: # sudo ufw status verbose @@ -61,6 +61,8 @@ with_items: - { direction: 'in', destination: '10.0.0.1/32' } - { direction: 'out', destination: '10.0.0.1/32' } + - { direction: 'in', destination: '10.0.2.254/32' } + - { direction: 'out', destination: '10.0.2.243/32' } - { direction: 'in', destination: '10.16.109.252/32' } - { direction: 'out', destination: '10.16.109.252/32' } - { direction: 'in', destination: '10.16.1.1/32' } @@ -79,6 +81,8 @@ with_items: - { direction: 'in', destination: '10.0.0.1/32' } - { direction: 'out', destination: '10.0.0.1/32' } + - { direction: 'in', destination: '10.0.2.254/32' } + - { direction: 'out', destination: '10.0.2.243/32' } - { direction: 'in', destination: '10.16.109.252/32' } - { direction: 'out', destination: '10.16.109.252/32' } - { direction: 'in', destination: '10.16.1.1/32' } @@ -88,6 +92,17 @@ when: config_ufw environment: PATH: /sbin:{{ ansible_env.PATH }} + - name: Allow apt-proxy-Access to some servers + ufw: + rule: allow + direction: '{{ item.direction }}' + dest: '{{ item.destination }}' + port: '3142' + with_items: + - { direction: 'in', destination: '10.0.2.254/32' } + - { direction: 'out', destination: '10.0.2.243/32' } + - { direction: 'in', destination: '10.16.1.3/32' } + - { direction: 'out', destination: '10.16.1.3/32' } - name: Allow DNS-Access to some servers ufw: @@ -211,8 +226,7 @@ - name: intall some prior installed packages apt: name: - - htop - - nmap + - curl state: latest - name: Enable ufw