v1
This commit is contained in:
commit
8d4915543e
132 files changed
+20628
No files matched your search
@@ -0,0 +1,20 @@
|
||||
# Two NetBox instances: qualified names, ambiguity, an unreachable instance.
|
||||
config <<'EOF'
|
||||
resolver:
|
||||
strategies: [management_subnet, primary_ip]
|
||||
management_subnets: [10.231.1.0/24]
|
||||
ssh:
|
||||
default_user: ops
|
||||
rules:
|
||||
- match: {kind: vm, instance: fsn}
|
||||
proxy_jump: ops@10.231.0.30
|
||||
EOF
|
||||
expect_fail "same name in both instances is ambiguous" "found 2 exact matches" netssh --dry-run web1
|
||||
expect_eq "fsn/web1 through the bastion" "web1" netssh fsn/web1 hostname
|
||||
expect_eq "lab/web1 directly" "lab-web1" netssh lab/web1 hostname
|
||||
expect_eq "lab uses its v1 token" "lab-db1" netssh lab/lab-db1 hostname
|
||||
|
||||
# lab unreachable: qualified fsn targets still work, unqualified ones need every instance.
|
||||
sed -i 's#http://10.231.0.21:8080#http://10.231.0.21:9#' "$XDG_CONFIG_HOME/netssh.yaml"
|
||||
expect_eq "qualified target with another instance down" "fsn1-pve1" netssh fsn/fsn1-pve1.hoster.test hostname
|
||||
expect_fail "unqualified target needs every instance" "10.231.0.21:9" netssh --dry-run fsn1-pve1.hoster.test
|
||||
Reference in new issue
Block a user