-
Notifications
You must be signed in to change notification settings - Fork 16
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
GomathiselviS
wants to merge
11
commits into
ansible-network:master
Choose a base branch
from
GomathiselviS:add_eos
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
bd21055
adding eos
GomathiselviS 09aab4e
Upgrade eos
GomathiselviS a8f4791
Add default gw
GomathiselviS fc040f3
corrected boot file
GomathiselviS 9dcb900
Added default gw config
GomathiselviS dfad6f0
add rm ssh key command
GomathiselviS daec77c
comment rm ssh key command
GomathiselviS 7959530
Remove ssh key task
GomathiselviS 647937d
add template
GomathiselviS 265d22b
setting hostkey as only rsa
GomathiselviS d6352cf
add sf ssh key
GomathiselviS File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
- name: Bootstrap VM | ||
expect: | ||
command: telnet localhost 8888 | ||
responses: "{{ expect_responses }}" | ||
timeout: "{{ bootstrap_timeout }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
- name: reset the connection | ||
meta: reset_connection | ||
|
||
- name: Wait for image boot up | ||
pause: | ||
seconds: 100 | ||
|
||
- arista.eos.eos_config: | ||
src: "{{ image_config_path | default (platform + '/' + build_version + '/config.j2') }}" | ||
save_when: always | ||
become: true | ||
vars: | ||
ansible_user: admin | ||
ansible_ssh_pass: admin | ||
ansible_port: 8022 | ||
ansible_network_os: eos | ||
ansible_host_key_checking: false | ||
ansible_become: true | ||
ansible_become_method: enable | ||
ansible_become_pass: admin | ||
ansible_connection: ansible.netcommon.network_cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
- arista.eos.eos_command: | ||
commands: "zerotouch disable" | ||
become: true | ||
vars: | ||
ansible_user: admin | ||
ansible_password: admin | ||
ansible_port: 8022 | ||
ansible_network_os: eos | ||
ansible_host_key_checking: false | ||
ansible_become: true | ||
ansible_become_method: enable | ||
ansible_become_pass: admin | ||
ansible_connection: ansible.netcommon.network_cli | ||
|
||
- name: Wait for the network device to reload | ||
wait_for_connection: | ||
delay: 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
no username admin | ||
hostname {{ hostname }} | ||
dns domain {{ domain_name }} | ||
ip name-server 1.1.1.1 | ||
|
||
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[eos] | ||
{{ hostname }}.{{ domain_name }} | ||
|
||
[eos:vars] | ||
ansible_network_os=eos | ||
ansible_connection=local | ||
ansible_host=localhost | ||
ansible_port=8022 | ||
ansible_user={{ admin_user }} | ||
ansible_ssh_pass={{ admin_user_password }} | ||
ansible_become=true | ||
ansible_become_method=enable | ||
ansible_become_pass={{ admin_user_password }} | ||
ansible_connection=ansible.netcommon.network_cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
/usr/bin/qemu-system-x86_64 -nographic -m 6144 -smp 2 -enable-kvm -serial telnet:localhost:8888,server,nowait -monitor telnet:localhost:8889,server,nowait -netdev user,id=net0,hostfwd=tcp::8022-:22 -device e1000,netdev=net0 -netdev user,id=net1 -device e1000,netdev=net1 -netdev user,id=net2 -device e1000,netdev=net2 -drive file={{ image_name }}.qcow2,if=ide & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
expect_responses: | ||
'localhost login: ': 'admin' | ||
'localhost>': enable | ||
'localhost#': | ||
- config | ||
- bash | ||
- copy running-config startup-config | ||
- "\x1d" | ||
'localhost\(config\)#': | ||
- username admin secret admin | ||
- event-handler dhcp-ma1-on-boot | ||
- exit | ||
'localhost\(config-handler-dhcp-ma1-on-boot\)#': | ||
- trigger on-boot | ||
- action bash /mnt/flash/dhcp-ma1-on-boot.sh | ||
- delay 30 | ||
- exit | ||
'\[admin@localhost ~\]\$ ': | ||
- sudo dhclient ma1 | ||
- | | ||
cat << EOF > /mnt/flash/dhcp-ma1-on-boot.sh | ||
#!/bin/bash | ||
|
||
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 $(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}') | ||
" | ||
EOF | ||
- exit | ||
'telnet>': quit | ||
|
||
qemu_command: "/usr/bin/qemu-system-x86_64 -nographic -m 2G -smp 2 -enable-kvm -serial telnet:localhost:8888,server,nowait -monitor telnet:localhost:8889,server,nowait -netdev user,id=net0,hostfwd=tcp::8022-:22 -device e1000,netdev=net0 -netdev user,id=net1 -device e1000,netdev=net1 -netdev user,id=net2 -device e1000,netdev=net2 -drive file=cloned_image,if=ide" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Then paste the output of the script. I cannot see why the variables wouldn't work properly