Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add eos image 4.24.6F #23

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions templates/eos/4.24.6M/config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@ hostname {{ hostname }}
dns domain {{ domain_name }}
ip name-server 1.1.1.1

interface Management 1
ip address dhcp
ip address 10.0.2.15 255.255.255.0

ip route 0.0.0.0 0.0.0.0 10.0.2.2

username {{ admin_user }} secret {{ admin_user_password }} privilege 15
username {{ regular_user }} secret {{ regular_user_password }} privilege 1
username zuul privilege 15 nopassword

interface Management 1
ip address dhcp

username zuul ssh-key ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDI3XA0A84nUpCr9mfkrDjBdoNFtYMXqXMm2+WsGrOJUA2ESodUDDfTKmsA/xEygdCnj8JfSC3SYhc0uKHVe0RdG20mzntUqD50kB0STFeOHh3ee7FXmMxcLqLlyY9pJkn1V5WOi/D1Lbz8MwRUVBfqufryavwHla/9CPuAtPcut8mTUB0+Rapnv8W3n4dA6PqHNW1tylJUXj6P4trJPnFrdfMaIxc21tfd/QrMM4h90phW3zNILE0qF9UHpQxP0zew/LcD9rc+IhnbgC3DeCQDyiqJOsJRDo58RuwWmQHCF0SfiFQJ4qwrc6TFSJqSdi2aRY0S/vRMbXkD+6Hg2KWQyz6Z6EpY7RARletqJwNnzuuhXr2HSCj5QALe+0U/aUEX+dnydYBX6Nqa+0Rz/qV5aUk4YP1C2/dBCAdbYXPotBT6QBfekE428mJV8Mr7G/M7kwZ8v9WjytyJ8/FYNuekYDWonk6QTwDgQhMTiQI3Yxnu3ID63BL959lfUIv96bsifVI6/D36KTAdFi/dl7Omn5MZ9A5JXA7l+yEJKf4pcPTpQcPbjGSKyaPu0uffEjV9CTr3+VMwzq1uenxGDQ9cT/ud4pEEjwU/ihr6yttouTCvDu9ydrflHljUXxf+X00NW7HkrHnvS43AGnxQzi9g2lTOC9yDlDGbQjmnVjec7w== zuul-executor

enable password {{ enable_password }}
6 changes: 3 additions & 3 deletions vars/eos/4.24.6M/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ expect_responses:
cat << EOF > /mnt/flash/dhcp-ma1-on-boot.sh
#!/bin/bash

dhclient ma1
sudo dhclient ma1
ADDRESS=$(ifconfig ma1|grep inet|awk -F " " '{print $2}')
NETMASK=$(ifconfig ma1|grep inet|awk -F " " '{print $4}')
DEFAULT_GW=$(ip route|grep default|awk -F " " '{print $3}')
FastCli -p 15 -c $a"
configure terminal
interface Management1
ip address $ADDRESS $NETMASK
ip route 0.0.0.0 0.0.0.0 $DEFAULT_GW
ip address $(ifconfig ma1|grep inet|awk -F " " '{print $2}') $(ifconfig ma1|grep inet|awk -F " " '{print $4}')
ip route 0.0.0.0 0.0.0.0 $(ip route|grep default|awk -F " " '{print $3}')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did we replace the variables from above? We should move this logic to lines 26 to 28

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variables are getting substituted properly, hence removed the variables. I will remove the variable declarations.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the variables are substituted properly, then why doesn't the commands work as expected?

It looks like you've just move the logic from lines above to here, which is a noop.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the typo. The variables are not getting substituted properly. After I used the value directly, instead of the variable, the commands are formed correctly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets do this, can you revert this change. Set

/bin/bash -ex

Then paste the output of the script. I cannot see why the variables wouldn't work properly

"
EOF
- exit
Expand Down