mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-23 22:50:09 +03:00
M #-: Rename last NIC on vultr to eth_one (#1294)
This commit is contained in:
parent
7011820d98
commit
ebcef1dd05
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
|
||||
# The network device to configure
|
||||
networking_iface: 'ens7'
|
||||
networking_iface: 'eth_one'
|
||||
|
||||
# Netmask of the interface
|
||||
networking_prefix: 20
|
||||
|
@ -23,6 +23,6 @@
|
||||
- { protocol: 'udp', port: 8472 }
|
||||
- update-replica
|
||||
- role: frr
|
||||
frr_iface: 'ens7'
|
||||
frr_iface: 'eth_one'
|
||||
# Use /20 for the internal management network address
|
||||
frr_prefix_length: 20
|
||||
|
@ -32,7 +32,7 @@ networks:
|
||||
# vntemplates:
|
||||
# - name: "${provision}-private"
|
||||
# vn_mad: 'vxlan'
|
||||
# phydev: 'ens7'
|
||||
# phydev: 'eth_one'
|
||||
# automatic_vlan_id: 'yes'
|
||||
# netrole: 'private'
|
||||
# vxlan_mode: 'evpn'
|
||||
|
@ -32,7 +32,7 @@ networks:
|
||||
vntemplates:
|
||||
- name: "${provision}-private"
|
||||
vn_mad: 'vxlan'
|
||||
phydev: 'ens7'
|
||||
phydev: 'eth_one'
|
||||
automatic_vlan_id: 'yes'
|
||||
netrole: 'private'
|
||||
vxlan_mode: 'evpn'
|
||||
|
@ -59,7 +59,13 @@ module OneProvision
|
||||
end
|
||||
|
||||
user_data << "chmod 700 ~/.ssh\n"
|
||||
user_data << 'chmod 644 ~/.ssh/authorized_keys'
|
||||
user_data << "chmod 644 ~/.ssh/authorized_keys\n"
|
||||
|
||||
# Rename last NIC to eth_one
|
||||
user_data << "NIC=$(ip --brief link show | tail -1 | awk '{print $1}')\n"
|
||||
user_data << "ip link set down $NIC\n"
|
||||
user_data << "ip link set $NIC name eth_one\n"
|
||||
user_data << 'ip link set up $NIC'
|
||||
|
||||
Base64.strict_encode64(user_data)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user