Skip to content
Snippets Groups Projects
Commit 20a5166e authored by ngyimesi's avatar ngyimesi
Browse files

First working version

parent e4b004b9
Branches
No related tags found
No related merge requests found
#!/bin/bash
ip link add link eno4 name eno4.151 type vlan id 151
ip addr add 10.151.43.202/16 dev eno4.151
ip link set eno4 up
ip link set eno4.151 up
ip route add 0.0.0.0/0 via 10.151.255.254
apt update
......
......@@ -28,6 +28,7 @@
private: no
- name: "bridge1_address"
prompt: "Please provide bridge address for storage bond #1 in IP/Mask format:"
private: no
- name: "bond2_name"
prompt: "Please provide name for storage bond #2:"
private: no
......@@ -39,9 +40,10 @@
private: no
- name: "bridge2_address"
prompt: "Please provide bridge address for storage bond #2 in IP/Mask format:"
private: no
tasks:
- set_fact:
c: "{{ interface_list_csv.split(',') }}"
interface_list: "{{ interface_list_csv.split(',') }}"
- name: Upgrade
import_tasks: tasks/upgrade.yml
- name: Configure network
......
......@@ -8,6 +8,7 @@
with_items:
- norbey
- mike
- tgt
- name: add key
authorized_key:
......@@ -18,3 +19,7 @@
key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJJ6Rp2ETGHzEfyQZsR4Ac0iJUrtytLi2C7MZIiiCcug norbey@hellothere
- name: mike
key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBVHRlgZ+UTSBCChrpYTzOhLek9r9CcoNPoE2EcFXvz0 mike@curiosity
- name: tgt
key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB2Xg/WEJ1Tt4kO8fwbpvs+/w+UU5ZpENRaYfqmjdXjJ Takács Gergő Tibor (git.sch.bme.hu)
- name: root
key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJJ6Rp2ETGHzEfyQZsR4Ac0iJUrtytLi2C7MZIiiCcug norbey@hellothere
......@@ -7,13 +7,14 @@
state: present
- name: Remove eno4.151 created by bootstrap script
shell:
cmd: ip link del eno4.151
cmd: ip link del eno4.151 || return 0
- name: Backup old interfaces file
copy:
src: /etc/network/interfaces
dest: /etc/network/interfaces.old
remote_src: yes
- name: Deploy new interfaces file
template:
src: templates/interfaces.j2
......
......@@ -78,7 +78,7 @@ iface vmbr0 inet manual
#Main bridge
auto {{ bridge1_name }}
iface {{ bridge1_name }}{{ bridge1_name }} inet static
iface {{ bridge1_name }} inet static
address {{ bridge1_address }}
bridge-ports {{ bond1_name }}
bridge-stp off
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment