ios01(config)#username kingyo secret ?
0 Specifies an UNENCRYPTED secret will follow
5 Specifies a MD5 HASHED secret will follow
8 Specifies a PBKDF2 HASHED secret will follow
9 Specifies a SCRYPT HASHED secret will follow
LINE The UNENCRYPTED (cleartext) user secret
ios01(config)#username kingyo algorithm-type ?
md5 Encode the password using the MD5 algorithm
scrypt Encode the password using the SCRYPT hashing algorithm
sha256 Encode the password using the PBKDF2 hashing algorithm
ios01(config)#username kingyo algorithm-type md5 sec
ios01(config)#username kingyo algorithm-type md5 secret dummpypassword
ios01(config)#do sh run | inc kingyo
username kingyo secret 5 $1$26Rc$Udv...(略)...MFnil7oS2/
ios01(config)#enable algorithm-type ?
md5 Encode the password using the MD5 algorithm
scrypt Encode the password using the SCRYPT hashing algorithm
sha256 Encode the password using the PBKDF2 hashing algorithm
ios01(config)#enable algorithm-type md5 secret himitsu
ios01(config)#do sh run | inc enable
enable secret 5 $1$HV4O$b7a...(略)...FWAv6KChK.
SCRYPT
algorithm-type で scrypt を指定します。
以降、ユーザーパスワードでの例のみ紹介します。
ios01(config)#username kingyo algorithm-type scrypt secret dummpypassword
ios01(config)#do sh run | inc kingyo
username kingyo secret 9 $9$YbDbDq1mN2FjUc$...(略)...D0s4hYLjVAYtay6src
PBKDF2
algorithm-type で sha256 を指定します。
ios01(config)#username kingyo algorithm-type sha256 secret dummpypassword
ios01(config)#do sh run | inc kingyo
username kingyo secret 8 $8$kMPJPfu1dkoCaM$...(略)...2ZPJ/USf6.usW9RVPe/dOJE5pe.Hzg
A collection can be reinstalled with new version requirements without using the --force flag. The collection's dependencies will also be updated if necessary with the new requirements. Use --upgrade to force transitive dependency updates.
TASK [ping] *************************************************************************************************************************************************************************************
fatal: [ios01]: FAILED! => {"msg": "Invalid data passed to 'loop', it requires a list, got this instead: <built-in method items of dict object at 0x7f1e6c33ba68>. Hint: If you passed a list/dict of just one element, try adding wantlist=True to your lookup invocation or use q/query instead of lookup."}
(a210) [admin@gitlab stumble]$ ansible-playbook -i inventory.ini bonmiss02.yml
ERROR! couldn't resolve module/action 'cisco.ios.ios_lldp_interface'. This often indicates a misspelling, missing collection, or incorrect module path.
The error appears to be in '/home/admin/general/vagrant/nwlab/stumble/bonmiss02.yml': line 5, column 7, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
tasks:
- name: configure lldp
^ here
(a210) [admin@gitlab stumble]$ ansible-playbook -i inventory.ini bonmiss05.yml
ERROR! We were unable to read either as JSON nor YAML, these are the errors we got from each:
JSON: Expecting value: line 1 column 1 (char 0)
Syntax Error while loading YAML.
did not find expected '-' indicator
The error appears to be in '/home/admin/general/vagrant/nwlab/stumble/bonmiss05.yml': line 8, column 6, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
msg: "hello {{ item }}"
loop:
^ here
TASK [debug] ************************************************************************************************************************************************************************************
fatal: [ios01]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'mgs' is undefined\n\nThe error appears to be in '/home/admin/general/vagrant/nwlab/stumble/bonmiss06.yml': line 8, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n tasks:\n - name: debug\n ^ here\n"}
(a300) [admin@gitlab stumble]$ ansible-playbook -i inventory.ini test.yml
PLAY [ios] *********************************************************************
TASK [show] ********************************************************************
ok: [ios01]
TASK [debug] *******************************************************************
ok: [ios01] => {
"msg": [
"GigabitEthernet0/0 is up, line protocol is up ",
" Hardware is iGbE, address is 5254.0001.xxxx (bia 5254.0001.xxx)",
" Internet address is 192.168.1.11/24",
" MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, ",
" reliability 255/255, txload 1/255, rxload 1/255",
" Encapsulation ARPA, loopback not set",
" Keepalive set (10 sec)",
" Auto Duplex, Auto Speed, link type is auto, media type is RJ45",
" output flow-control is unsupported, input flow-control is unsupported",
" ARP type: ARPA, ARP Timeout 04:00:00",
" Last input 00:00:00, output
...(略)...