diff --git a/Inventories/test/docker05.inv b/Inventories/test/docker05.inv new file mode 100644 index 0000000..0284c6b --- /dev/null +++ b/Inventories/test/docker05.inv @@ -0,0 +1 @@ +ansible-docker05 ansible_host=172.20.1.169 hostname=ansible-docker05 \ No newline at end of file diff --git a/Inventories/test/host_vars/ansible-docker05.yml b/Inventories/test/host_vars/ansible-docker05.yml new file mode 100644 index 0000000..1fb146f --- /dev/null +++ b/Inventories/test/host_vars/ansible-docker05.yml @@ -0,0 +1,58 @@ +interface_name: "Wired connection 1" +static_ip: 172.20.1.33 +netmask: 0/24 +gateway: 172.20.1.251 +dns_servers: + - 172.20.1.251 + - 172.20.1.10 + - 172.20.1.11 + - 8.8.8.8 +new_hostname: "ansible-docker05" +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 +# Liste von IPs mit Erlaubnis für SSH +ssh_ips: + - "195.192.223.212" # Ratingen + - "87.128.173.178" # Essen + - "94.79.143.149" # Dirk + +# Liste von Ports, die erlaubt sind +tcp_ports: + - "22" + - "6789" + - "8080" + - "8443" + - "8843" + - "8880" + +udp_ports: + - "3478" + +ssh_pub_key: "" + +admin_users: + - name: admin-johannes + - name: admin-daniel + - name: admin-dirk + - name: admin-martin + +groups_to_add: "sudo,docker" \ No newline at end of file diff --git a/setups/enable_ansible.sh b/setups/enable_ansible.sh index 459c6e7..44c5996 100644 --- a/setups/enable_ansible.sh +++ b/setups/enable_ansible.sh @@ -2,7 +2,7 @@ # enable host for ansible set -e PUBKEY="ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAEuwAZEN/DNkr1KkBsHdw1kRV964httL4gqpstBgComJy549miU2Cul0ozyl76qv8L6BNCzQywW86Kbb2h8glufSwCDwbcZpmQUN4lRDctrWHUU8R2mPLwSQfFqc+AVYomotegaVOnSwQzpOkTJIv94LWI3Amsfo0L/2V8JY0cb3WNMIg== root@ansible-host" -id -u ansible > /dev/null 2>&1 || adduser ansible --disabled-password --gecos "" --quiet +id -u ansible > /dev/null 2>&1 || /sbin/adduser ansible --disabled-password --gecos "" --quiet mkdir -p /home/ansible/.ssh echo "$PUBKEY" > /home/ansible/.ssh/authorized_keys chown -R ansible /home/ansible/.ssh