{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3962","repository_url":"https://api.github.com/repos/ansible/ansible-modules-core","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3962/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3962/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3962/events","html_url":"https://github.com/ansible/ansible-modules-core/issues/3962","id":160627325,"number":3962,"title":"Unable to deploy config to junos","user":{"login":"Akvarium","id":5605019,"avatar_url":"https://avatars.githubusercontent.com/u/5605019?v=3","gravatar_id":"","url":"https://api.github.com/users/Akvarium","html_url":"https://github.com/Akvarium","followers_url":"https://api.github.com/users/Akvarium/followers","following_url":"https://api.github.com/users/Akvarium/following{/other_user}","gists_url":"https://api.github.com/users/Akvarium/gists{/gist_id}","starred_url":"https://api.github.com/users/Akvarium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Akvarium/subscriptions","organizations_url":"https://api.github.com/users/Akvarium/orgs","repos_url":"https://api.github.com/users/Akvarium/repos","events_url":"https://api.github.com/users/Akvarium/events{/privacy}","received_events_url":"https://api.github.com/users/Akvarium/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/bug_report","name":"bug_report","color":"fbca04"},{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/networking","name":"networking","color":"c7def8"},{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/P2","name":"P2","color":"fad8c7"},{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/waiting_on_maintainer","name":"waiting_on_maintainer","color":"d93f0b"}],"state":"open","locked":false,"assignee":{"login":"privateip","id":414626,"avatar_url":"https://avatars.githubusercontent.com/u/414626?v=3","gravatar_id":"","url":"https://api.github.com/users/privateip","html_url":"https://github.com/privateip","followers_url":"https://api.github.com/users/privateip/followers","following_url":"https://api.github.com/users/privateip/following{/other_user}","gists_url":"https://api.github.com/users/privateip/gists{/gist_id}","starred_url":"https://api.github.com/users/privateip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/privateip/subscriptions","organizations_url":"https://api.github.com/users/privateip/orgs","repos_url":"https://api.github.com/users/privateip/repos","events_url":"https://api.github.com/users/privateip/events{/privacy}","received_events_url":"https://api.github.com/users/privateip/received_events","type":"User","site_admin":false},"assignees":[{"login":"privateip","id":414626,"avatar_url":"https://avatars.githubusercontent.com/u/414626?v=3","gravatar_id":"","url":"https://api.github.com/users/privateip","html_url":"https://github.com/privateip","followers_url":"https://api.github.com/users/privateip/followers","following_url":"https://api.github.com/users/privateip/following{/other_user}","gists_url":"https://api.github.com/users/privateip/gists{/gist_id}","starred_url":"https://api.github.com/users/privateip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/privateip/subscriptions","organizations_url":"https://api.github.com/users/privateip/orgs","repos_url":"https://api.github.com/users/privateip/repos","events_url":"https://api.github.com/users/privateip/events{/privacy}","received_events_url":"https://api.github.com/users/privateip/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/milestones/4","html_url":"https://github.com/ansible/ansible-modules-core/milestones/2.2.0","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/milestones/4/labels","id":1756290,"number":4,"title":"2.2.0","description":"","creator":{"login":"alikins","id":15162,"avatar_url":"https://avatars.githubusercontent.com/u/15162?v=3","gravatar_id":"","url":"https://api.github.com/users/alikins","html_url":"https://github.com/alikins","followers_url":"https://api.github.com/users/alikins/followers","following_url":"https://api.github.com/users/alikins/following{/other_user}","gists_url":"https://api.github.com/users/alikins/gists{/gist_id}","starred_url":"https://api.github.com/users/alikins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alikins/subscriptions","organizations_url":"https://api.github.com/users/alikins/orgs","repos_url":"https://api.github.com/users/alikins/repos","events_url":"https://api.github.com/users/alikins/events{/privacy}","received_events_url":"https://api.github.com/users/alikins/received_events","type":"User","site_admin":false},"open_issues":46,"closed_issues":57,"state":"open","created_at":"2016-05-09T19:02:33Z","updated_at":"2016-09-07T19:53:17Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2016-06-16T10:19:58Z","updated_at":"2016-09-07T19:54:54Z","closed_at":null,"body":"<!--- Verify first that your issue/request is not already reported in GitHub -->\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 plugin/module/task -->\r\nmodules/core/network/junos/junos_template.py\r\nmodule_utils/junos.py\r\n##### ANSIBLE VERSION\r\n<!--- Paste verbatim output from “ansible --version” between quotes below -->\r\n```\r\nansible 2.1.0.0\r\n  config file = /home/mcdowell/git/stamnet-automasjon-ansible/ansible.cfg\r\n  configured module search path = Default w/o overrides\r\n```\r\n\r\n##### CONFIGURATION\r\n<!---\r\nMention any settings you have changed/added/removed in ansible.cfg\r\n(or using the ANSIBLE_* environment variables).\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\n-->\r\nUbunut 14.04\r\n##### SUMMARY\r\n<!--- Explain the problem briefly -->\r\nUnable to deploy a junos template to a router\r\n##### STEPS TO REPRODUCE\r\n<!---\r\nFor bugs, show exactly how to reproduce the problem.\r\nFor new features, show how the feature would be used.\r\n-->\r\nRun the playbook under, does not need actual configuration file.\r\n\r\n<!--- Paste example playbooks or commands between quotes below -->\r\n```\r\n - name: juniper device\r\n   hosts:  all\r\n   gather_facts: no\r\n   connection: local\r\n\r\n   tasks:\r\n     - name: push config to host\r\n       junos_template:\r\n         host: \"{{ host }}\"\r\n         port: 830\r\n         password: \"{{ default_pw }}\"\r\n         username: \"{{ default_user }}\"\r\n         src: \"{{ build_dir }}{{ ansible_host }}/system_confg\"\r\n\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\nExpected the config to be deployed to router.\r\n##### ACTUAL RESULTS\r\n<!--- What actually happened? If possible run with extra verbosity (-vvvv) -->\r\nFailed with ascii error.\r\n\r\n<!--- Paste verbatim command output between quotes below -->\r\n```\r\nThe error was: UnicodeEncodeError: 'ascii' codec can't encode characters in position 13559-13560: ordinal not in range(128)\r\nfatal: [fwbuilder-gw2]: FAILED! => {\"changed\": false, \"failed\": true, \"module_stderr\": \"Traceback (most recent call last):\\n  File \\\"/tmp/ansible_onhFr8/ansible_module_junos_template.py\\\", line 151, in <module>\\n    main()\\n  File \\\"/tmp/ansible_onhFr8/ansible_module_junos_template.py\\\", line 135, in main\\n    results['_backup'] = str(module.get_config()).strip()\\n  File \\\"/tmp/ansible_onhFr8/ansible_modlib.zip/ansible/module_utils/junos.py\\\", line 331, in get_config\\n  File \\\"/tmp/ansible_onhFr8/ansible_modlib.zip/ansible/module_utils/junos.py\\\", line 264, in get_config\\nUnicodeEncodeError: 'ascii' codec can't encode characters in position 13559-13560: ordinal not in range(128)\\n\", \"module_stdout\": \"\", \"msg\": \"MODULE FAILURE\", \"parsed\": false}\r\n```\r\n\r\n##### Potential fix?\r\n\r\nChanged the str parsing on line 135 in junos_template.py and on line 264 in junos.py to unicode instead. This seems to have fixed the issue, but not sure if it's a good fix or not, if it is, feel free to take the credits for it.\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/comments/245397155","html_url":"https://github.com/ansible/ansible-modules-core/issues/3962#issuecomment-245397155","issue_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3962","id":245397155,"user":{"login":"ansibot","id":6585283,"avatar_url":"https://avatars.githubusercontent.com/u/6585283?v=3","gravatar_id":"","url":"https://api.github.com/users/ansibot","html_url":"https://github.com/ansibot","followers_url":"https://api.github.com/users/ansibot/followers","following_url":"https://api.github.com/users/ansibot/following{/other_user}","gists_url":"https://api.github.com/users/ansibot/gists{/gist_id}","starred_url":"https://api.github.com/users/ansibot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansibot/subscriptions","organizations_url":"https://api.github.com/users/ansibot/orgs","repos_url":"https://api.github.com/users/ansibot/repos","events_url":"https://api.github.com/users/ansibot/events{/privacy}","received_events_url":"https://api.github.com/users/ansibot/received_events","type":"User","site_admin":false},"created_at":"2016-09-07T19:54:54Z","updated_at":"2016-09-07T19:54:54Z","body":"@privateip, @gundalow, ping. This issue is still waiting on your response.\n[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)\n<!--- boilerplate: issue_renotify_maintainer --->"}}
{"actor":{"display_login":"ansibot"}}