Browse Source

Weitere Daeien hinzugefügt

master
Dirk Wirts 2 years ago
parent
commit
a8fddb41ad
  1. 1
      Inventories/test/host_vars/ansible-docker05.yml
  2. 14
      ansible-set-static-ip.yml
  3. 21
      setups/setup.info

1
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

14
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

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