title: What is the problem with the following output?
body: <p>Every time I start my playbook I get an error. I figured out it is a problem with the ios_config module and maybe Python.</p>
  
  <p>I got the information from radius, that the username is authenticated and this seems to work.</p>
  
  <p>I just want a simple configuration change in the first step.</p>
  
  <pre><code>Playbook.yaml
  ---
  - name: Basic Show Commands
    hosts: SWITCH
    gather_facts: False
    connection: local
  
  
    tasks:
      - name: add vlan
        ios_config:
          lines:
            - vlan 3219
  </code></pre>
  
  <p><code>Ansible.cfg</code>:</p>
  
  <pre><code>[defaults]
  transport = local
  hostfile = ./hosts
  host_key_checking = False
  timeout = 5
  </code></pre>
  
  <p>Run Command:</p>
  
  <pre><code>sudo ansible-playbook -u A-USERNAME-N  -k play.yaml -c paramiko (Username is written like this)
  </code></pre>
  
  <p>The Error looks like this:</p>
  
  <pre><code>ansible-playbook 2.5.1
    config file = /etc/ansible/ansible.cfg
    configured module search path = [u'/home/admin1/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
    ansible python module location = /usr/lib/python2.7/dist-packages/ansible
    executable location = /usr/bin/ansible-playbook
    python version = 2.7.15rc1 (default, Nov 12 2018, 14:31:15) [GCC 7.3.0]
  Using /etc/ansible/ansible.cfg as config file
  [DEPRECATION WARNING]: [defaults]hostfile option, The key is misleading as it can also be a list of hosts, a directory or a list of paths , use [defaults]
  inventory=/path/to/file|dir instead. This feature will be removed in version 2.8. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
  SSH password:
  Parsed /etc/ansible/hosts inventory source with ini plugin
  
  PLAYBOOK: play.yaml ***********************************************************************************************************************************************************
  1 plays in play.yaml
  
  PLAY [Basic Show Commands] ****************************************************************************************************************************************************
  META: ran handlers
  
  TASK [add vlan] ***************************************************************************************************************************************************************
  task path: /etc/ansible/play.yaml:25
  &lt;10.1.103.60&gt; using connection plugin network_cli (was local)
  Using module file /usr/lib/python2.7/dist-packages/ansible/modules/network/ios/ios_config.py
  &lt;10.1.103.60&gt; ESTABLISH LOCAL CONNECTION FOR USER: root
  &lt;10.1.103.60&gt; EXEC /bin/sh -c 'echo ~ &amp;&amp; sleep 0'
  &lt;10.1.103.60&gt; EXEC /bin/sh -c '( umask 77 &amp;&amp; mkdir -p "` echo /home/admin1/.ansible/tmp/ansible-tmp-1553866282.25-60687928596971 `" &amp;&amp; echo ansible-tmp-1553866282.25-60687928596971="` echo /home/admin1/.ansible/tmp/ansible-tmp-1553866282.25-60687928596971 `" ) &amp;&amp; sleep 0'
  &lt;10.1.103.60&gt; PUT /home/admin1/.ansible/tmp/ansible-local-21017N44pTj/tmpWR4cIJ TO /home/admin1/.ansible/tmp/ansible-tmp-1553866282.25-60687928596971/ios_config.py
  &lt;10.1.103.60&gt; EXEC /bin/sh -c 'chmod u+x /home/admin1/.ansible/tmp/ansible-tmp-1553866282.25-60687928596971/ /home/admin1/.ansible/tmp/ansible-tmp-1553866282.25-60687928596971/ios_config.py &amp;&amp; sleep 0'
  &lt;10.1.103.60&gt; EXEC /bin/sh -c '/usr/bin/python /home/admin1/.ansible/tmp/ansible-tmp-1553866282.25-60687928596971/ios_config.py &amp;&amp; sleep 0'
  &lt;10.1.103.60&gt; EXEC /bin/sh -c 'rm -f -r /home/admin1/.ansible/tmp/ansible-tmp-1553866282.25-60687928596971/ &gt; /dev/null 2&gt;&amp;1 &amp;&amp; sleep 0'
  The full traceback is:
  Traceback (most recent call last):
    File "/tmp/ansible_d8od9psi/ansible_modlib.zip/ansible/module_utils/network/ios/ios.py", line 114, in get_config
  KeyError: ''
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/tmp/ansible_d8od9psi/ansible_module_ios_config.py", line 573, in &lt;module&gt;
      main()
    File "/tmp/ansible_d8od9psi/ansible_module_ios_config.py", line 476, in main
      config, have_banners = get_running_config(module, config)
    File "/tmp/ansible_d8od9psi/ansible_module_ios_config.py", line 374, in get_running_config
      contents = get_config(module, flags=flags)
    File "/tmp/ansible_d8od9psi/ansible_modlib.zip/ansible/module_utils/network/ios/ios.py", line 117, in get_config
    File "/tmp/ansible_d8od9psi/ansible_modlib.zip/ansible/module_utils/connection.py", line 149, in __rpc__
  ansible.module_utils.connection.ConnectionError: show running-config all
                  ^
  % Invalid input detected at '^' marker.
  
  DE003SW01#
  
  fatal: [10.1.103.60]: FAILED! =&gt; {
      "changed": false,
      "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_d8od9psi/ansible_modlib.zip/ansible/module_utils/network/ios/ios.py\", line 114, in get_config\nKeyError: ''\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"/tmp/ansible_d8od9psi/ansible_module_ios_config.py\", line 573, in &lt;module&gt;\n    main()\n  File \"/tmp/ansible_d8od9psi/ansible_module_ios_config.py\", line 476, in main\n    config, have_banners = get_running_config(module, config)\n  File \"/tmp/ansible_d8od9psi/ansible_module_ios_config.py\", line 374, in get_running_config\n    contents = get_config(module, flags=flags)\n  File \"/tmp/ansible_d8od9psi/ansible_modlib.zip/ansible/module_utils/network/ios/ios.py\", line 117, in get_config\n  File \"/tmp/ansible_d8od9psi/ansible_modlib.zip/ansible/module_utils/connection.py\", line 149, in __rpc__\nansible.module_utils.connection.ConnectionError: show running-config all\r\n                ^\r\n% Invalid input detected at '^' marker.\r\n\r\nDE003SW01#\n",
      "module_stdout": "",
      "msg": "MODULE FAILURE",
      "rc": 1
  }
  </code></pre>