shell command not getting executed on the remote node

35 views
Skip to first unread message

Sharwari Phadnis

unread,
Sep 15, 2015, 9:14:54 AM9/15/15
to Ansible Project
I want to add a linux bridge on a remote node having ubuntu 14.04 version. I wrote a playbook to do so, it is as following:
---
- hosts: ans
#  user: sudo
  tasks:
    - name: send and execute
      shell: /sbin/brctl addbr br11

I've used shell command to execute brctl on the remote node but, it is showing me the following error:

 FAILED! => {"changed": false, "failed": true, "msg": "Traceback (most recent call last):\r\n  File \"/home/sharwari/ansible-tmp/tmp/ansible-tmp-1442293860.85-278841567636677/command\", line 1913, in <module>\r\n    main()\r\n  File \"/home/sharwari/ansible-tmp/tmp/ansible-tmp-1442293860.85-278841567636677/command\", line 90, in main\r\n    module = CommandModule(argument_spec=dict())\r\n  File \"/home/sharwari/ansible-tmp/tmp/ansible-tmp-1442293860.85-278841567636677/command\", line 543, in __init__\r\n    self._check_for_check_mode()\r\n  File \"/home/sharwari/ansible-tmp/tmp/ansible-tmp-1442293860.85-278841567636677/command\", line 1079, in _check_for_check_mode\r\n    for (k,v) in self.params.iteritems():\r\nAttributeError: 'tuple' object has no attribute 'iteritems'\r\nOpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 30220\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 10.117.81.185 closed.\r\n", "parsed": false}




Brian Coca

unread,
Sep 15, 2015, 10:18:25 AM9/15/15
to Ansible Project
you seem to have a mixed installation, that error is normally produced
by version 1.x of the command module when used with 2.x ansible.




--
Brian Coca
Reply all
Reply to author
Forward
0 new messages