Skip to content

Commit

Permalink
Using new Proxmox kernel 'pve-kernel-6.2' and added DHCP instructions…
Browse files Browse the repository at this point in the history
… for gateway and DNS
  • Loading branch information
AngeIo committed Jun 1, 2023
1 parent 7652348 commit 79b6b53
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion roles/bifrost-baremetal-json/templates/baremetal_json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"public_keys": {"0": "{{ lookup('ansible.builtin.env', 'SH_PROX_SSHKEY_CONTENT') }}"},
"hostname": "{{ lookup('ansible.builtin.env', 'SH_PROX_FQDN') }}"
},
"user_data": "#cloud-config\nmanage_etc_hosts: false\npackage_reboot_if_required: true\npackage_update: true\npackage_upgrade: true\npackages:\n - git\n - neofetch\nusers:\n - default\n - name: root\n lock_passwd: false\n hashed_passwd: '$6$rounds=4096$1FvzX3SRQRhcNnPc$GCV17Uf3qJAjGw6Ea30fjVcVx9p1.O7erSAUFGt4bGkrlmfjZ.ADrIveaFLisCG.61wPBlahouxADEweMelyl.'",
"user_data": "#cloud-config\nmanage_etc_hosts: false\npackage_reboot_if_required: true\npackage_update: true\npackage_upgrade: true\nusers:\n - default",
"network_data": {
"links": [
{
Expand Down
2 changes: 1 addition & 1 deletion roles/proxmox-installer/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

- name: Install Proxmox VE kernel
apt:
name: pve-kernel-5.15
name: pve-kernel-6.2
state: present
register: kernel_install

Expand Down
4 changes: 4 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,13 @@ case $choice in
echo $unattended_ez | sudo -S sed -i "s/^# network_interface: \"virbr0\"$/network_interface: \"$SH_PROX_BIFROST_INTERFACE\"/" $SH_PROX_BIFROST_PATH/playbooks/inventory/group_vars/target
echo $unattended_ez | sudo -S pip install setuptools==59.5.0
# Add DHCP instructions
lineinfile "dnsmasq_router:" "dnsmasq_router: $SH_PROX_GATEWAY" $SH_PROX_BIFROST_PATH/playbooks/inventory/group_vars/localhost
lineinfile "dnsmasq_dns_servers:" "dnsmasq_dns_servers: $SH_PROX_DNSONE,$SH_PROX_DNSTWO" $SH_PROX_BIFROST_PATH/playbooks/inventory/group_vars/localhost
lineinfile "dhcp_provider:" 'dhcp_provider: "dnsmasq"' $SH_PROX_BIFROST_PATH/playbooks/inventory/group_vars/localhost
lineinfile "dhcp_pool_start:" "dhcp_pool_start: $SH_PROX_PROX_DHCPSTART" $SH_PROX_BIFROST_PATH/playbooks/inventory/group_vars/localhost
lineinfile 'dhcp_pool_end:' "dhcp_pool_end: $SH_PROX_PROX_DHCPEND" $SH_PROX_BIFROST_PATH/playbooks/inventory/group_vars/localhost
lineinfile "dnsmasq_router:" "dnsmasq_router: $SH_PROX_GATEWAY" $SH_PROX_BIFROST_PATH/playbooks/inventory/group_vars/target
lineinfile "dnsmasq_dns_servers:" "dnsmasq_dns_servers: $SH_PROX_DNSONE,$SH_PROX_DNSTWO" $SH_PROX_BIFROST_PATH/playbooks/inventory/group_vars/target
lineinfile "dhcp_provider:" 'dhcp_provider: "dnsmasq"' $SH_PROX_BIFROST_PATH/playbooks/inventory/group_vars/target
lineinfile "dhcp_pool_start:" "dhcp_pool_start: $SH_PROX_PROX_DHCPSTART" $SH_PROX_BIFROST_PATH/playbooks/inventory/group_vars/target
lineinfile 'dhcp_pool_end:' "dhcp_pool_end: $SH_PROX_PROX_DHCPEND" $SH_PROX_BIFROST_PATH/playbooks/inventory/group_vars/target
Expand Down
4 changes: 2 additions & 2 deletions variables.sh.example
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ export SH_PROX_IPMIPASS=
# The SERIAL number of the disk you want to install your OS on, example: 800204e0000000009d80b87dbbc7c304
export SH_PROX_ROOTDEVSERIAL=

# At what IP address the DHCP pool for Bifrost should start, example: 10.5.0.20
# At what IP address the DHCP pool for Bifrost should start, example: 10.5.255.50
export SH_PROX_PROX_DHCPSTART=

# At what IP address the DHCP pool for Bifrost should end, example: 10.5.0.100
# At what IP address the DHCP pool for Bifrost should end, example: 10.5.255.200
export SH_PROX_PROX_DHCPEND=

# The IP address you want to give to your server on the new OS, example: 10.5.0.10
Expand Down

0 comments on commit 79b6b53

Please sign in to comment.