{"action":"closed","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2449","repository_url":"https://api.github.com/repos/ansible/ansible-modules-core","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2449/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2449/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2449/events","html_url":"https://github.com/ansible/ansible-modules-core/issues/2449","id":116317145,"number":2449,"title":"Git.py is unable to fetch submodule updates due to locales","user":{"login":"glenux","id":81168,"avatar_url":"https://avatars.githubusercontent.com/u/81168?v=3","gravatar_id":"","url":"https://api.github.com/users/glenux","html_url":"https://github.com/glenux","followers_url":"https://api.github.com/users/glenux/followers","following_url":"https://api.github.com/users/glenux/following{/other_user}","gists_url":"https://api.github.com/users/glenux/gists{/gist_id}","starred_url":"https://api.github.com/users/glenux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glenux/subscriptions","organizations_url":"https://api.github.com/users/glenux/orgs","repos_url":"https://api.github.com/users/glenux/repos","events_url":"https://api.github.com/users/glenux/events{/privacy}","received_events_url":"https://api.github.com/users/glenux/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"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-11T11:42:43Z","updated_at":"2016-02-07T20:49:00Z","closed_at":"2016-02-07T20:49:00Z","body":"##### Issue Type:\r\n\r\n  - Bug Report\r\n\r\n##### Ansible Version:\r\n\r\n    $ ansible --version\r\n    ansible 1.9.4\r\n      configured module search path = None\r\n\r\n##### Ansible Configuration:\r\n\r\nDefault debian configuration for ansible (nothing changed).\r\n\r\nHere is the diff with the current upstream version : \r\n\r\n    $ diff -Nur examples/ansible.cfg /etc/ansible/ansible.cfg\r\n    --- examples/ansible.cfg    2015-11-11 11:23:15.701009848 +0100\r\n    +++ /etc/ansible/ansible.cfg        2015-09-04 01:03:08.000000000 +0200\r\n    @@ -11,18 +11,18 @@\r\n     \r\n     # some basic default values...\r\n     \r\n    -#inventory      = /etc/ansible/hosts\r\n    +inventory      = /etc/ansible/hosts\r\n     #library        = /usr/share/my_modules/\r\n    -#remote_tmp     = $HOME/.ansible/tmp\r\n    -#pattern        = *\r\n    -#forks          = 5\r\n    -#poll_interval  = 15\r\n    -#sudo_user      = root\r\n    +remote_tmp     = $HOME/.ansible/tmp\r\n    +pattern        = *\r\n    +forks          = 5\r\n    +poll_interval  = 15\r\n    +sudo_user      = root\r\n     #ask_sudo_pass = True\r\n     #ask_pass      = True\r\n    -#transport      = smart\r\n    +transport      = smart\r\n     #remote_port    = 22\r\n    -#module_lang    = C\r\n    +module_lang    = C\r\n     \r\n     # plays will gather facts by default, which contain information about\r\n     # the remote system.\r\n    @@ -30,7 +30,7 @@\r\n     # smart - gather by default, but don't regather if already gathered\r\n     # implicit - gather by default, turn off with gather_facts: False\r\n     # explicit - do not gather by default, must say gather_facts: True\r\n    -#gathering = implicit\r\n    +gathering = implicit\r\n     \r\n     # additional paths to search for roles in, colon separated\r\n     #roles_path    = /etc/ansible/roles\r\n    @@ -38,20 +38,14 @@\r\n     # uncomment this to disable SSH key host checking\r\n     #host_key_checking = False\r\n     \r\n    -# change the default callback\r\n    -#stdout_callback = skippy\r\n    -# enable additional callbacks\r\n    -#callback_whitelist = timer, mail\r\n    -\r\n     # change this for alternative sudo implementations\r\n    -#sudo_exe = sudo\r\n    +sudo_exe = sudo\r\n     \r\n    -# What flags to pass to sudo\r\n    -# WARNING: leaving out the defaults might create unexpected behaviours\r\n    -#sudo_flags = -H -S -n\r\n    +# what flags to pass to sudo\r\n    +#sudo_flags = -H\r\n     \r\n     # SSH timeout\r\n    -#timeout = 10\r\n    +timeout = 10\r\n     \r\n     # default user to use for playbooks if user is not specified\r\n     # (/usr/bin/ansible will use current user as default)\r\n    @@ -74,11 +68,6 @@\r\n     # this can also be set to 'merge'.\r\n     #hash_behaviour = replace\r\n     \r\n    -# by default, variables from roles will be visible in the global variable\r\n    -# scope. To prevent this, the following option can be enabled, and only\r\n    -# tasks and handlers within the role will see the variables there\r\n    -#private_role_vars = yes\r\n    -\r\n     # list any Jinja2 extensions to enable here:\r\n     #jinja2_extensions = jinja2.ext.do,jinja2.ext.i18n\r\n     \r\n    @@ -86,12 +75,10 @@\r\n     # if passing --private-key to ansible or ansible-playbook\r\n     #private_key_file = /path/to/file\r\n     \r\n    -# format of string {{ ansible_managed }} available within Jinja2\r\n    +# format of string {{ ansible_managed }} available within Jinja2 \r\n     # templates indicates to users editing templates files will be replaced.\r\n     # replacing {file}, {host} and {uid} and strftime codes with proper values.\r\n    -#ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}\r\n    -# This short version is better used in templates as it won't flag the file as changed every run.\r\n    -#ansible_managed = Ansible managed: {file} on {host}\r\n    +ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}\r\n     \r\n     # by default, ansible-playbook will display \"Skipping [host]\" if it determines a task\r\n     # should not be run on a host.  Set this to \"False\" if you don't want to see these \"Skipping\" \r\n    @@ -125,13 +112,12 @@\r\n     \r\n     \r\n     # set plugin path directories here, separate with colons\r\n    -#action_plugins     = /usr/share/ansible/plugins/action\r\n    -#callback_plugins   = /usr/share/ansible/plugins/callback\r\n    -#connection_plugins = /usr/share/ansible/plugins/connection\r\n    -#lookup_plugins     = /usr/share/ansible/plugins/lookup\r\n    -#vars_plugins       = /usr/share/ansible/plugins/vars\r\n    -#filter_plugins     = /usr/share/ansible/plugins/filter\r\n    -#test_plugins       = /usr/share/ansible/plugins/test\r\n    +action_plugins     = /usr/share/ansible_plugins/action_plugins\r\n    +callback_plugins   = /usr/share/ansible_plugins/callback_plugins\r\n    +connection_plugins = /usr/share/ansible_plugins/connection_plugins\r\n    +lookup_plugins     = /usr/share/ansible_plugins/lookup_plugins\r\n    +vars_plugins       = /usr/share/ansible_plugins/vars_plugins\r\n    +filter_plugins     = /usr/share/ansible_plugins/filter_plugins\r\n     \r\n     # by default callbacks are not loaded for /bin/ansible, enable this if you\r\n     # want, for example, a notification or logging callback to also apply to \r\n    @@ -143,52 +129,36 @@\r\n     # set to 1 if you don't want cowsay support or export ANSIBLE_NOCOWS=1 \r\n     #nocows = 1\r\n     \r\n    -# set which cowsay stencil you'd like to use by default. When set to 'random',\r\n    -# a random stencil will be selected for each task. The selection will be filtered\r\n    -# against the `cow_whitelist` option below.\r\n    -#cow_selection = default\r\n    -#cow_selection = random\r\n    -\r\n    -# when using the 'random' option for cowsay, stencils will be restricted to this list.\r\n    -# it should be formatted as a comma-separated list with no spaces between names.\r\n    -# NOTE: line continuations here are for formatting purposes only, as the INI parser\r\n    -#       in python does not support them.\r\n    -#cow_whitelist=bud-frogs,bunny,cheese,daemon,default,dragon,elephant-in-snake,elephant,eyes,\\\r\n    -#              hellokitty,kitty,luke-koala,meow,milk,moofasa,moose,ren,sheep,small,stegosaurus,\\\r\n    -#              stimpy,supermilker,three-eyes,turkey,turtle,tux,udder,vader-koala,vader,www\r\n    -\r\n     # don't like colors either?\r\n     # set to 1 if you don't want colors, or export ANSIBLE_NOCOLOR=1\r\n     #nocolor = 1\r\n     \r\n    +# the CA certificate path used for validating SSL certs. This path \r\n    +# should exist on the controlling node, not the target nodes\r\n    +# common locations:\r\n    +# RHEL/CentOS: /etc/pki/tls/certs/ca-bundle.crt\r\n    +# Fedora     : /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem\r\n    +# Ubuntu     : /usr/share/ca-certificates/cacert.org/cacert.org.crt\r\n    +#ca_file_path = \r\n    +\r\n    +# the http user-agent string to use when fetching urls. Some web server\r\n    +# operators block the default urllib user agent as it is frequently used\r\n    +# by malicious attacks/scripts, so we set it to something unique to \r\n    +# avoid issues.\r\n    +#http_user_agent = ansible-agent\r\n    +\r\n     # if set to a persistent type (not 'memory', for example 'redis') fact values\r\n     # from previous runs in Ansible will be stored.  This may be useful when\r\n     # wanting to use, for example, IP information from one group of servers\r\n     # without having to talk to them in the same playbook run to get their\r\n     # current IP information.\r\n    -#fact_caching = memory\r\n    +fact_caching = memory\r\n     \r\n     \r\n     # retry files\r\n    -# When a playbook fails by default a .retry file will be created in ~/\r\n    -# You can disable this feature by setting retry_files_enabled to False\r\n    -# and you can change the location of the files by setting retry_files_save_path\r\n    -\r\n     #retry_files_enabled = False\r\n     #retry_files_save_path = ~/.ansible-retry\r\n     \r\n    -\r\n    -# prevents logging of task data, off by default\r\n    -#no_log = False\r\n    -\r\n    -# prevents logging of tasks, but only on the targets, data is still logged on the master/controller\r\n    -#no_target_syslog = True\r\n    -\r\n    -# controls the compression level of variables sent to\r\n    -# worker processes. At the default of 0, no compression\r\n    -# is used. This value must be an integer from 0 to 9.\r\n    -#var_compression_level = 9\r\n    -\r\n     [privilege_escalation]\r\n     #become=True\r\n     #become_method=sudo\r\n    @@ -238,19 +208,14 @@\r\n     # (default is sftp)\r\n     #scp_if_ssh = True\r\n     \r\n    -# if False, sftp will not use batch mode to transfer files. This may cause some\r\n    -# types of file transfer failures impossible to catch however, and should\r\n    -# only be disabled if your sftp version has problems with batch mode\r\n    -#sftp_batch_mode = False\r\n    -\r\n     [accelerate]\r\n    -#accelerate_port = 5099\r\n    -#accelerate_timeout = 30\r\n    -#accelerate_connect_timeout = 5.0\r\n    +accelerate_port = 5099\r\n    +accelerate_timeout = 30\r\n    +accelerate_connect_timeout = 5.0\r\n     \r\n     # The daemon timeout is measured in minutes. This time is measured\r\n     # from the last activity to the accelerate daemon.\r\n    -#accelerate_daemon_timeout = 30 \r\n    +accelerate_daemon_timeout = 30 \r\n     \r\n     # If set to yes, accelerate_multi_key will allow multiple\r\n     # private keys to be uploaded to it, though each user must\r\n    @@ -261,5 +226,5 @@\r\n     [selinux]\r\n     # file systems that require special treatment when dealing with security context\r\n     # the default behaviour that copies the existing context or uses the user default\r\n    -# needs to be changed to use the file system dependent context.\r\n    -#special_context_filesystems=nfs,vboxsf,fuse,ramfs\r\n    +# needs to be changed to use the file system dependant context.\r\n    +#special_context_filesystems=nfs,vboxsf,fuse\r\n\r\n##### Environment:\r\n\r\nDebian stretch/sid\r\n\r\n    $ locale\r\n    LANG=fr_FR.UTF-8\r\n    LANGUAGE=fr\r\n    LC_CTYPE=\"fr_FR.UTF-8\"\r\n    LC_NUMERIC=\"fr_FR.UTF-8\"\r\n    LC_TIME=\"fr_FR.UTF-8\"\r\n    LC_COLLATE=\"fr_FR.UTF-8\"\r\n    LC_MONETARY=\"fr_FR.UTF-8\"\r\n    LC_MESSAGES=\"fr_FR.UTF-8\"\r\n    LC_PAPER=\"fr_FR.UTF-8\"\r\n    LC_NAME=\"fr_FR.UTF-8\"\r\n    LC_ADDRESS=\"fr_FR.UTF-8\"\r\n    LC_TELEPHONE=\"fr_FR.UTF-8\"\r\n    LC_MEASUREMENT=\"fr_FR.UTF-8\"\r\n    LC_IDENTIFICATION=\"fr_FR.UTF-8\"\r\n    LC_ALL=fr_FR.UTF-8\r\n\r\n##### Summary:\r\n\r\n- The git module of ansible is unable to fetch submodule updates\r\n- The module tries to match \"Entering \"  (https://github.com/ansible/ansible-modules-core/blob/devel/source_control/git.py#L301)\r\n- It gets \"Entrée dans \" on my system\r\n- /usr/bin/git output is translated according to locales (fr_FR) but the git module does not seem to take that in account.\r\n\r\n##### Steps To Reproduce:\r\n\r\nDownload and run the following demo code :\r\n\r\n    git clone https://github.com/glenux/bugreport-ansible-git-locales.git\r\n    cd bugreport-ansible-git-locales\r\n    $EDITOR local.yml  # <== change the \"become_user:\" line with your own username\r\n    ./local.sh\r\n\r\nIt will do the following steps :\r\n\r\n- connect on root@localhost\r\n- download/update the YouCompleteMe plugin for vim in the ~/YouCompleteMe-demo directory of target user\r\n\r\n##### Expected Results:\r\n\r\nEvery run of demo code should be OK (ie: ok=2 changed=1)\r\n\r\n##### Actual Results:\r\n\r\nThe first run of demo code wil be OK. The second run will FAIL with the following error :\r\n\r\n> msg: Unable to parse submodule hash line: Entrée dans 'third_party/requests'\r\n\r\n\r\nFirst run of demo code : \r\n\r\n    $ ./local.sh\r\n    \r\n    PLAY [all] ******************************************************************** \r\n    \r\n    GATHERING FACTS *************************************************************** \r\n    <localhost> REMOTE_MODULE setup\r\n    ok: [localhost]\r\n    \r\n    TASK: [Fetch YouCompleteMe plugin for vim] ************************************ \r\n    <localhost> REMOTE_MODULE git repo=https://github.com/Valloric/YouCompleteMe.git dest=~/YouCompleteMe-demo update=yes accept_hostkey=yes\r\n    changed: [localhost] => {\"after\": \"65cc309421b199a2bde68b97105537d5c489d401\", \"before\": null, \"changed\": true}\r\n    \r\n    PLAY RECAP ******************************************************************** \r\n    localhost                  : ok=2    changed=1    unreachable=0    failed=0 \r\n\r\n\r\nSecond run :\r\n\r\n    $ ./local.sh\r\n    \r\n    PLAY [all] ******************************************************************** \r\n    \r\n    GATHERING FACTS *************************************************************** \r\n    <localhost> REMOTE_MODULE setup\r\n    ok: [localhost]\r\n    \r\n    TASK: [Fetch YouCompleteMe plugin for vim] ************************************ \r\n    <localhost> REMOTE_MODULE git repo=https://github.com/Valloric/YouCompleteMe.git dest=~/YouCompleteMe-demo update=yes accept_hostkey=yes\r\n    failed: [localhost] => {\"failed\": true}\r\n    msg: Unable to parse submodule hash line: Entrée dans 'third_party/requests'\r\n    \r\n    FATAL: all hosts have already failed -- aborting\r\n    \r\n    PLAY RECAP ******************************************************************** \r\n               to retry, use: --limit @/home/warbrain/local.retry\r\n    \r\n    localhost                  : ok=1    changed=0    unreachable=0    failed=1  \r\n\r\n"}}