{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/13385","labels_url":"https://api.github.com/repos/ansible/ansible/issues/13385/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/13385/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/13385/events","html_url":"https://github.com/ansible/ansible/issues/13385","id":119840643,"number":13385,"title":"UnicodeEncodeError: 'ascii' codec can't encode character u'\\u2018' ","user":{"login":"xanview","id":578881,"avatar_url":"https://avatars.githubusercontent.com/u/578881?v=3","gravatar_id":"","url":"https://api.github.com/users/xanview","html_url":"https://github.com/xanview","followers_url":"https://api.github.com/users/xanview/followers","following_url":"https://api.github.com/users/xanview/following{/other_user}","gists_url":"https://api.github.com/users/xanview/gists{/gist_id}","starred_url":"https://api.github.com/users/xanview/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xanview/subscriptions","organizations_url":"https://api.github.com/users/xanview/orgs","repos_url":"https://api.github.com/users/xanview/repos","events_url":"https://api.github.com/users/xanview/events{/privacy}","received_events_url":"https://api.github.com/users/xanview/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04"},{"url":"https://api.github.com/repos/ansible/ansible/labels/easyfix","name":"easyfix","color":"d4c5f9"},{"url":"https://api.github.com/repos/ansible/ansible/labels/P3","name":"P3","color":"fef2c0"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/ansible/ansible/milestones/5","html_url":"https://github.com/ansible/ansible/milestones/v2","labels_url":"https://api.github.com/repos/ansible/ansible/milestones/5/labels","id":975800,"number":5,"title":"v2","description":null,"creator":{"login":"bcoca","id":836171,"avatar_url":"https://avatars.githubusercontent.com/u/836171?v=3","gravatar_id":"","url":"https://api.github.com/users/bcoca","html_url":"https://github.com/bcoca","followers_url":"https://api.github.com/users/bcoca/followers","following_url":"https://api.github.com/users/bcoca/following{/other_user}","gists_url":"https://api.github.com/users/bcoca/gists{/gist_id}","starred_url":"https://api.github.com/users/bcoca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcoca/subscriptions","organizations_url":"https://api.github.com/users/bcoca/orgs","repos_url":"https://api.github.com/users/bcoca/repos","events_url":"https://api.github.com/users/bcoca/events{/privacy}","received_events_url":"https://api.github.com/users/bcoca/received_events","type":"User","site_admin":false},"open_issues":25,"closed_issues":570,"state":"open","created_at":"2015-02-11T19:43:06Z","updated_at":"2015-12-04T20:14:20Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-12-02T00:32:55Z","updated_at":"2015-12-04T20:55:17Z","closed_at":"2015-12-04T19:52:21Z","body":"I'm using latest Ansible 2 from git. \r\n\r\nI am runnig this task:\r\n\r\n```yaml\r\n- name: \"create APT security auto-upgrades configuration\"\r\n  copy: \"src={{ item.src }} dest={{ item.dest }} owner=root group=root mode=0644\"\r\n  with_items:\r\n    - { src: 'apt/auto-upgrades', dest: '/etc/apt/apt.conf.d/20auto-upgrades' }\r\n```\r\n\r\nMy template file contents are:\r\n\r\n```\r\nAPT::Periodic::Update-Package-Lists \"1\";\r\nAPT::Periodic::Unattended-Upgrade \"1\";\r\n```\r\n\r\nI am getting this result:\r\n\r\n```\r\n$ ansible-playbook timeboxes.yml --limit 18f90a257a0b69c2d569 -vvv\r\nUsing /Users/Hackeron/Development/Xanview/xanview-ansible/ansible.cfg as config file\r\n1 plays in timeboxes.yml\r\n\r\nPLAY ***************************************************************************\r\n\r\nTASK [setup] *******************************************************************\r\n<vpn-18f90a257a0b69c2d569.timeline.is> ESTABLISH SSH CONNECTION FOR USER: deployer\r\n<vpn-18f90a257a0b69c2d569.timeline.is> SSH: EXEC ssh -C -q -o ForwardAgent=yes -o ConnectTimeout=300 -o ControlPersist=60m -o ServerAliveInterval=45 -o ServerAliveCountMax=10 -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deployer -o ConnectTimeout=300 -o ControlPath=/Users/Hackeron/.ansible/cp/ansible-ssh-%h-%p-%r -tt vpn-18f90a257a0b69c2d569.timeline.is /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '\"'\"'echo BECOME-SUCCESS-jnlznspxlvwuxkzqagmmjisqzrfezzai; LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 python -uc '\"'\"'\"'\"'\"'\"'\"'\"'import sys; [sys.stdout.write(s) for s in iter(sys.stdin.readline, \"__EOF__942d747a0772c3284ffb5920e234bd57__\\n\")]'\"'\"'\"'\"'\"'\"'\"'\"'| LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python'\"'\"''\r\nok: [18f90a257a0b69c2d569]\r\n\r\nTASK [common : include] ********************************************************\r\ntask path: /Users/Hackeron/Development/Xanview/xanview-ansible/roles/common/tasks/main.yml:1\r\nincluded: /Users/Hackeron/Development/Xanview/xanview-ansible/roles/common/tasks/user.yml for 18f90a257a0b69c2d569\r\n\r\nTASK [common : include] ********************************************************\r\ntask path: /Users/Hackeron/Development/Xanview/xanview-ansible/roles/common/tasks/main.yml:12\r\nincluded: /Users/Hackeron/Development/Xanview/xanview-ansible/roles/common/tasks/apt.yml for 18f90a257a0b69c2d569\r\n\r\nTASK [common : create APT security auto-upgrades configuration] ****************\r\ntask path: /Users/Hackeron/Development/Xanview/xanview-ansible/roles/common/tasks/apt.yml:16\r\n<vpn-18f90a257a0b69c2d569.timeline.is> ESTABLISH SSH CONNECTION FOR USER: deployer\r\n<vpn-18f90a257a0b69c2d569.timeline.is> SSH: EXEC ssh -C -q -o ForwardAgent=yes -o ConnectTimeout=300 -o ControlPersist=60m -o ServerAliveInterval=45 -o ServerAliveCountMax=10 -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deployer -o ConnectTimeout=300 -o ControlPath=/Users/Hackeron/.ansible/cp/ansible-ssh-%h-%p-%r -tt vpn-18f90a257a0b69c2d569.timeline.is /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '\"'\"'echo BECOME-SUCCESS-xzmfbpsfnfkoawniiyorsnxvpxzifgfp; rc=flag; [ -r /etc/apt/apt.conf.d/20auto-upgrades ] || rc=2; [ -f /etc/apt/apt.conf.d/20auto-upgrades ] || rc=1; [ -d /etc/apt/apt.conf.d/20auto-upgrades ] && rc=3; python -V 2>/dev/null || rc=4; [ x\"$rc\" != \"xflag\" ] && echo \"${rc}  \"/etc/apt/apt.conf.d/20auto-upgrades && exit 0; (python -c '\"'\"'\"'\"'\"'\"'\"'\"'import hashlib; BLOCKSIZE = 65536; hasher = hashlib.sha1();\r\nafile = open(\"'\"'\"'\"'\"'\"'\"'\"'\"'/etc/apt/apt.conf.d/20auto-upgrades'\"'\"'\"'\"'\"'\"'\"'\"'\", \"rb\")\r\nbuf = afile.read(BLOCKSIZE)\r\nwhile len(buf) > 0:\r\n\thasher.update(buf)\r\n\tbuf = afile.read(BLOCKSIZE)\r\nafile.close()\r\nprint(hasher.hexdigest())'\"'\"'\"'\"'\"'\"'\"'\"' 2>/dev/null) || (python -c '\"'\"'\"'\"'\"'\"'\"'\"'import sha; BLOCKSIZE = 65536; hasher = sha.sha();\r\nafile = open(\"'\"'\"'\"'\"'\"'\"'\"'\"'/etc/apt/apt.conf.d/20auto-upgrades'\"'\"'\"'\"'\"'\"'\"'\"'\", \"rb\")\r\nbuf = afile.read(BLOCKSIZE)\r\nwhile len(buf) > 0:\r\n\thasher.update(buf)\r\n\tbuf = afile.read(BLOCKSIZE)\r\nafile.close()\r\nprint(hasher.hexdigest())'\"'\"'\"'\"'\"'\"'\"'\"' 2>/dev/null) || (echo '\"'\"'\"'\"'\"'\"'\"'\"'0  '\"'\"'\"'\"'\"'\"'\"'\"'/etc/apt/apt.conf.d/20auto-upgrades)'\"'\"''\r\n<vpn-18f90a257a0b69c2d569.timeline.is> ESTABLISH SSH CONNECTION FOR USER: deployer\r\n<vpn-18f90a257a0b69c2d569.timeline.is> SSH: EXEC ssh -C -q -o ForwardAgent=yes -o ConnectTimeout=300 -o ControlPersist=60m -o ServerAliveInterval=45 -o ServerAliveCountMax=10 -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deployer -o ConnectTimeout=300 -o ControlPath=/Users/Hackeron/.ansible/cp/ansible-ssh-%h-%p-%r -tt vpn-18f90a257a0b69c2d569.timeline.is (umask 22 && mkdir -p \"`echo $HOME/.ansible/tmp/ansible-tmp-1449016250.41-39620320318556`\" && echo \"`echo $HOME/.ansible/tmp/ansible-tmp-1449016250.41-39620320318556`\")\r\nAn exception occurred during task execution. The full traceback is:\r\nTraceback (most recent call last):\r\n  File \"/usr/local/Cellar/ansible/HEAD/libexec/lib/python2.7/site-packages/ansible/executor/process/worker.py\", line 135, in run\r\n    shared_loader_obj,\r\n  File \"/usr/local/Cellar/ansible/HEAD/libexec/lib/python2.7/site-packages/ansible/executor/task_executor.py\", line 91, in run\r\n    item_results = self._run_loop(items)\r\n  File \"/usr/local/Cellar/ansible/HEAD/libexec/lib/python2.7/site-packages/ansible/executor/task_executor.py\", line 241, in _run_loop\r\n    res = self._execute(variables=task_vars)\r\n  File \"/usr/local/Cellar/ansible/HEAD/libexec/lib/python2.7/site-packages/ansible/executor/task_executor.py\", line 404, in _execute\r\n    return dict(unreachable=True, msg=str(e))\r\nUnicodeEncodeError: 'ascii' codec can't encode character u'\\u2018' in position 478: ordinal not in range(128)\r\n\r\nfatal: [18f90a257a0b69c2d569]: FAILED! => {\"failed\": true, \"stdout\": \"\"}\r\n\r\nPLAY RECAP *********************************************************************\r\n18f90a257a0b69c2d569       : ok=3    changed=0    unreachable=0    failed=1   \r\n$\r\n```\r\n\r\nAny ideas? -- I do not have anything non ascii anywhere I can tell, what is causing this all of a sudden?"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/162079693","html_url":"https://github.com/ansible/ansible/issues/13385#issuecomment-162079693","issue_url":"https://api.github.com/repos/ansible/ansible/issues/13385","id":162079693,"user":{"login":"xanview","id":578881,"avatar_url":"https://avatars.githubusercontent.com/u/578881?v=3","gravatar_id":"","url":"https://api.github.com/users/xanview","html_url":"https://github.com/xanview","followers_url":"https://api.github.com/users/xanview/followers","following_url":"https://api.github.com/users/xanview/following{/other_user}","gists_url":"https://api.github.com/users/xanview/gists{/gist_id}","starred_url":"https://api.github.com/users/xanview/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xanview/subscriptions","organizations_url":"https://api.github.com/users/xanview/orgs","repos_url":"https://api.github.com/users/xanview/repos","events_url":"https://api.github.com/users/xanview/events{/privacy}","received_events_url":"https://api.github.com/users/xanview/received_events","type":"User","site_admin":false},"created_at":"2015-12-04T20:55:17Z","updated_at":"2015-12-04T20:55:17Z","body":"Thank you for the super quick fix :)"}}