From a8fddb41adf54d7a282b21dad21899ce20ee447c Mon Sep 17 00:00:00 2001 From: Dirk Wirts Date: Fri, 17 Nov 2023 17:08:39 +0100 Subject: [PATCH] =?UTF-8?q?Weitere=20Daeien=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/host_vars/ansible-docker05.yml | 1 + ansible-set-static-ip.yml | 14 ++++++------- setups/setup.info | 21 +++++++++++++++++++ 3 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 setups/setup.info diff --git a/Inventories/test/host_vars/ansible-docker05.yml b/Inventories/test/host_vars/ansible-docker05.yml index e4183b6..81ff725 100644 --- a/Inventories/test/host_vars/ansible-docker05.yml +++ b/Inventories/test/host_vars/ansible-docker05.yml @@ -1,6 +1,7 @@ interface_name: "Wired connection 1" static_ip: 172.20.1.33 netmask: 0/24 +netmask2: 24 gateway: 172.20.1.251 dns_servers: - 172.20.1.251 diff --git a/ansible-set-static-ip.yml b/ansible-set-static-ip.yml index f20a42b..33d1c59 100644 --- a/ansible-set-static-ip.yml +++ b/ansible-set-static-ip.yml @@ -37,12 +37,12 @@ set_fact: interface_name: "{{ dhcp_interface.stdout_lines[0] }}" - - name: Configure interface for static IP (rest of the tasks) - ansible.builtin.lineinfile: - path: /etc/network/interfaces - regexp: '^iface {{ interface_name }} inet dhcp' - line: 'iface {{ interface_name }} inet static' - backup: yes +# - name: Configure interface for static IP (rest of the tasks) +# ansible.builtin.lineinfile: +# path: /etc/network/interfaces +# regexp: '^iface {{ interface_name }} inet dhcp' +# line: 'iface {{ interface_name }} inet static' +# backup: yes # - name: Sichere die aktuelle Netzwerkkonfiguration # copy: @@ -55,7 +55,7 @@ block: | iface {{ interface_name }} inet static address {{ static_ip }} - netmask {{ netmask }} + netmask {{ netmask2 }} gateway {{ gateway }} dns-nameservers {{ dns_servers | join(' ') }} - name: Starte Netzwerk neu diff --git a/setups/setup.info b/setups/setup.info new file mode 100644 index 0000000..be9a780 --- /dev/null +++ b/setups/setup.info @@ -0,0 +1,21 @@ +Hier sind die Schritte zur Installation aufgeführt +--------------------------------------------------- + +Ansible docker05 Testlauf + 1. Linux VM aufsetzen + 2. shell script Kopieren /root -> ausführen + a. vi /etc/apt/sources.list -> cdrom source löschen + b. ssh -i /ansible/.ssh/ansible ansible@172.20.1.169 +Playbooks ausführen + 1. ansible-set_tz_hostname.yml + 2. ansible-harden_ssh.yml + 3. ansible-swappiness.yml + 4. ansible-update_timers.yml + 5. ansible-required_pkgs.yml + 6. ansible-config_fw.yml + 7. ansible-setup_docker.yml + 8. ansible-bash_aliases.yml + 9. ansible-setup_watchtower.yml + 10. ansible-setup_ssh_tunnel.yml + 11. ansible-setup_admins.yml + 12. ansible-set-static-ip.yml \ No newline at end of file