{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/30768","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/30768/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/30768/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/30768/events","html_url":"https://github.com/ansible/ansible/issues/30768","id":259868703,"number":30768,"title":"interfaces_file: need more than 1 value to unpack","user":{"login":"bobbywatson3","id":10324139,"avatar_url":"https://avatars3.githubusercontent.com/u/10324139?v=4","gravatar_id":"","url":"https://api.github.com/users/bobbywatson3","html_url":"https://github.com/bobbywatson3","followers_url":"https://api.github.com/users/bobbywatson3/followers","following_url":"https://api.github.com/users/bobbywatson3/following{/other_user}","gists_url":"https://api.github.com/users/bobbywatson3/gists{/gist_id}","starred_url":"https://api.github.com/users/bobbywatson3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobbywatson3/subscriptions","organizations_url":"https://api.github.com/users/bobbywatson3/orgs","repos_url":"https://api.github.com/users/bobbywatson3/repos","events_url":"https://api.github.com/users/bobbywatson3/events{/privacy}","received_events_url":"https://api.github.com/users/bobbywatson3/received_events","type":"User","site_admin":false},"labels":[{"id":562292166,"url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.4","name":"affects_2.4","color":"ededed","default":false},{"id":48276055,"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04","default":false},{"id":496359346,"url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":54811101,"url":"https://api.github.com/repos/ansible/ansible/labels/needs_info","name":"needs_info","color":"eb6420","default":false},{"id":636327968,"url":"https://api.github.com/repos/ansible/ansible/labels/support:community","name":"support:community","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-09-22T16:25:28Z","updated_at":"2017-10-05T21:13:17Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"<!---\r\nVerify first that your issue/request is not already reported on GitHub.\r\nAlso test if the latest release, and master branch are affected too.\r\n-->\r\n\r\n##### ISSUE TYPE\r\n<!--- Pick one below and delete the rest: -->\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\n<!--- Name of the module/plugin/task/feature -->\r\ninterfaces_file\r\n##### ANSIBLE VERSION\r\n<!--- Paste verbatim output from \"ansible --version\" between quotes below -->\r\n```\r\nansible 2.4.0.0\r\n  config file = /Users/bwatson/Projects/[removed]/ansible.cfg\r\n  configured module search path = [u'/Users/bwatson/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /Users/bwatson/Projects/[removed]/venv/lib/python2.7/site-packages/ansible\r\n  executable location = /Users/bwatson/Projects/[removed]/venv/bin/ansible\r\n  python version = 2.7.12 (default, Jun 29 2016, 14:05:02) [GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)]\r\n```\r\n\r\n##### CONFIGURATION\r\n<!---\r\nIf using Ansible 2.4 or above, paste the results of \"ansible-config dump --only-changed\"\r\n\r\nOtherwise, mention any settings you have changed/added/removed in ansible.cfg\r\n(or using the ANSIBLE_* environment variables).\r\n$ ansible-config dump --only-changed\r\nDEFAULT_REMOTE_TMP(/Users/bwatson/Projects/[removed]/ansible.cfg) = /tmp\r\nHOST_KEY_CHECKING(/Users/bwatson/Projects/[removed]/ansible.cfg) = False\r\nRETRY_FILES_ENABLED(/Users/bwatson/Projects/[removed]/ansible.cfg) = False\r\n-->\r\n\r\n##### OS / ENVIRONMENT\r\n<!---\r\nMention the OS you are running Ansible from, and the OS you are\r\nmanaging, or say \"N/A\" for anything that is not platform-specific.\r\nAlso mention the specific version of what you are trying to control,\r\ne.g. if this is a network bug the version of firmware on the network device.\r\n-->\r\nHost: OS X Python 2.7.12\r\nTarget: Cumulus Linux 3.1.1\r\n##### SUMMARY\r\n<!--- Explain the problem briefly -->\r\nUsing the interfaces_file task causes an error: ValueError: need more than 1 value to unpack\r\n##### STEPS TO REPRODUCE\r\n<!---\r\nFor bugs, show exactly how to reproduce the problem, using a minimal test-case.\r\nFor new features, show how the feature would be used.\r\n-->\r\nInstall ansible 2.4.0, run the example task shown in interfaces_file documentation.\r\n<!--- Paste example playbooks or commands between quotes below -->\r\n```yaml\r\n---\r\n- hosts: all\r\n  become: true\r\n  gather_facts: true\r\n\r\n  tasks:\r\n    - interfaces_file:\r\n        dest: /etc/network/interfaces\r\n        iface: eth1\r\n        option: mtu\r\n        value: 8000\r\n        backup: yes\r\n        state: present\r\n      register: eth1_cfg\r\n```\r\n\r\n<!--- You can also paste gist.github.com links for larger files -->\r\n\r\n##### EXPECTED RESULTS\r\n<!--- What did you expect to happen when running the steps above? -->\r\nI would expect the mtu for eth1 to be changed to 8000.\r\n##### ACTUAL RESULTS\r\n<!--- What actually happened? If possible run with extra verbosity (-vvvv) -->\r\nAn error is raised and the task fails. (This happens for any option. I tested multiple)\r\n<!--- Paste verbatim command output between quotes below -->\r\n```\r\n$ ansible-playbook interfaces_test.yml -i 172.20.116.11, -u admin -vv\r\nansible-playbook 2.4.0.0\r\n  config file = /Users/bwatson/Projects/[removed]/ansible.cfg\r\n  configured module search path = [u'/Users/bwatson/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /Users/bwatson/Projects/[removed]/venv/lib/python2.7/site-packages/ansible\r\n  executable location = /Users/bwatson/Projects/[removed]/venv/bin/ansible-playbook\r\n  python version = 2.7.12 (default, Jun 29 2016, 14:05:02) [GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)]\r\nUsing /Users/bwatson/Projects/[removed]/ansible.cfg as config file\r\n\r\nPLAYBOOK: interfaces_test.yml ***************************************************************************************************\r\n1 plays in interfaces_test.yml\r\n\r\nPLAY [all] **********************************************************************************************************************\r\n\r\nTASK [Gathering Facts] **********************************************************************************************************\r\nok: [172.20.116.11]\r\nMETA: ran handlers\r\n\r\nTASK [interfaces_file] **********************************************************************************************************\r\ntask path: /Users/bwatson/Projects/[removed]/interfaces_test.yml:17\r\nfatal: [172.20.116.11]: FAILED! => {\"changed\": false, \"failed\": true, \"module_stderr\": \"Shared connection to 172.20.116.11 closed.\\r\\n\", \"module_stdout\": \"Traceback (most recent call last):\\r\\n  File \\\"/tmp/ansible_GxJ8k1/ansible_module_interfaces_file.py\\\", line 385, in <module>\\r\\n    main()\\r\\n  File \\\"/tmp/ansible_GxJ8k1/ansible_module_interfaces_file.py\\\", line 366, in main\\r\\n    lines, ifaces = read_interfaces_file(module, dest)\\r\\n  File \\\"/tmp/ansible_GxJ8k1/ansible_module_interfaces_file.py\\\", line 177, in read_interfaces_file\\r\\n    return read_interfaces_lines(module, f)\\r\\n  File \\\"/tmp/ansible_GxJ8k1/ansible_module_interfaces_file.py\\\", line 211, in read_interfaces_lines\\r\\n    iface_name, address_family_name, method_name = words[1:4]\\r\\nValueError: need more than 1 value to unpack\\r\\n\", \"msg\": \"MODULE FAILURE\", \"rc\": 0}\r\n\r\nPLAY RECAP **********************************************************************************************************************\r\n172.20.116.11              : ok=1    changed=0    unreachable=0    failed=1\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/334593853","html_url":"https://github.com/ansible/ansible/issues/30768#issuecomment-334593853","issue_url":"https://api.github.com/repos/ansible/ansible/issues/30768","id":334593853,"user":{"login":"bobbywatson3","id":10324139,"avatar_url":"https://avatars3.githubusercontent.com/u/10324139?v=4","gravatar_id":"","url":"https://api.github.com/users/bobbywatson3","html_url":"https://github.com/bobbywatson3","followers_url":"https://api.github.com/users/bobbywatson3/followers","following_url":"https://api.github.com/users/bobbywatson3/following{/other_user}","gists_url":"https://api.github.com/users/bobbywatson3/gists{/gist_id}","starred_url":"https://api.github.com/users/bobbywatson3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobbywatson3/subscriptions","organizations_url":"https://api.github.com/users/bobbywatson3/orgs","repos_url":"https://api.github.com/users/bobbywatson3/repos","events_url":"https://api.github.com/users/bobbywatson3/events{/privacy}","received_events_url":"https://api.github.com/users/bobbywatson3/received_events","type":"User","site_admin":false},"created_at":"2017-10-05T21:13:17Z","updated_at":"2017-10-05T21:13:17Z","author_association":"CONTRIBUTOR","body":"I’m away from my computer for the next few days. I’m guessing you weren’t able to duplicate this?\r\n\r\nThe interfaces file was super basic, just a loop back and eth0 configured for dhcp. "}}
{"actor":{"display_login":"bobbywatson3"}}