deploy mongodb database
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
######################################
|
||||
# Configuration Client-Server #
|
||||
######################################
|
||||
---
|
||||
- name: Edit Network interface file on Client Server
|
||||
blockinfile:
|
||||
path: /etc/network/interfaces
|
||||
block: |
|
||||
auto enp7s0
|
||||
iface enp7s0 inet dhcp
|
||||
post-up ip route add default via 10.0.0.1
|
||||
|
||||
- name: Add Hetzner Nameserver
|
||||
blockinfile:
|
||||
path: /etc/resolvconf/resolv.conf.d/head
|
||||
block: |
|
||||
nameserver 8.8.8.8
|
||||
nameserver 8.8.4.4
|
||||
|
||||
- name: Enable Updates for resolvconf
|
||||
raw: "resolvconf --enable-updates"
|
||||
|
||||
- name: Update resolvconf
|
||||
raw: "resolvconf -u"
|
||||
|
||||
- name: Reboot Clients
|
||||
reboot:
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
######################################
|
||||
# Configuration NAT-Server #
|
||||
######################################
|
||||
---
|
||||
- name: Copy Public ssh-key and paste to NAT-Server
|
||||
copy:
|
||||
src: /tmp/id_rsa.pub
|
||||
dest: ~/.ssh/
|
||||
|
||||
- name: Copy Private ssh-key and paste to NAT-Server
|
||||
copy:
|
||||
src: /tmp/id_rsa
|
||||
dest: ~/.ssh/
|
||||
|
||||
- name: Change Permission of the Private ssh-key only to read for the User
|
||||
raw: "chmod 0400 ~/.ssh/id_rsa"
|
||||
|
||||
- name: Edit Network interface file on NAT-Server
|
||||
blockinfile:
|
||||
path: /etc/network/interfaces
|
||||
block: |
|
||||
auto eth0
|
||||
iface eth0 inet dhcp
|
||||
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
post-up iptables -t nat -A POSTROUTING -s '10.0.0.0/16' -o eth0 -j MASQUERADE
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
######################################
|
||||
# Generate SSH-Key #
|
||||
######################################
|
||||
---
|
||||
- name: Generate an OpenSSH keypair local
|
||||
community.crypto.openssh_keypair:
|
||||
path: /tmp/id_rsa
|
||||
type: rsa
|
||||
|
||||
|
||||
Reference in New Issue
Block a user