ansible - cisco IOS and “reload” command

前端 未结 5 562
梦如初夏
梦如初夏 2021-01-27 02:37

I would like to send command \"reload in \" to Cisco IOS, but that specific command needs to be confirmed like below:

#reload in 30
Reload scheduled in 30 minut         


        
5条回答
  •  甜味超标
    2021-01-27 03:02

    commands parameter of ios_command module expects a YAML formated list of commands. However in the code example provided commands parameter is set multiple times. Try the ios_command task like this:

    - name: do reload in case of "catting off"
      ios_command:
        commands:
          - reload in 30
          - y
      provider: "{{ cli }}"
    

提交回复
热议问题