hey everyone, i just got started with ansible today and have a question about the core git module - does it always make remote requests when a repo is specified, even when it's in the desired state?
i ask because ansible is taking considerable time at that step, which is annoying during this early fast iteration and is going to get really annoying once i have 20-30 repos in there. i haven't dug into the git module code, but i can only realistically attribute the delay to a remote request - the git module correctly reports that nothing has changed, but a run that includes the repo dependency takes 25 seconds, versus 1.2 seconds when the dependency is commented out (see output dumps at bottom).
imac:ansible nrser$ time ansible-playbook -v all.yaml
PLAY [all] ********************************************************************
GATHERING FACTS ***************************************************************
TASK: [github_repo | clone kcrawford/dockutil from github] ********************
ok: [localhost] => {"after": "7e7b56dae7a118c256748c2f69c82b912d64c6e2", "before": "7e7b56dae7a118c256748c2f69c82b912d64c6e2", "changed": false}
TASK: [dock | clean dock] *****************************************************
changed: [localhost] => {"changed": true, "cmd": "PYTHONIOENCODING=utf-8 ~/dev/gh/kcrawford/dockutil/scripts/dockutil --remove all", "delta": "0:00:00.095622", "end": "2015-02-18 19:33:21.744730", "rc": 0, "start": "2015-02-18 19:33:21.649108", "stderr": "", "stdout": "", "warnings": []}
TASK: [dock | add apps] *******************************************************
skipping: [localhost] => (item=apps)
TASK: [dock | add folders] ****************************************************
changed: [localhost] => (item={'path': '/Applications', 'view': 'list'}) => {"changed": true, "cmd": "PYTHONIOENCODING=utf-8 ~/dev/gh/kcrawford/dockutil/scripts/dockutil --add '/Applications' --view list --display folder --sort name", "delta": "0:00:00.096044", "end": "2015-02-18 19:33:21.943452", "item": {"path": "/Applications", "view": "list"}, "rc": 0, "start": "2015-02-18 19:33:21.847408", "stderr": "", "stdout": "", "warnings": []}
changed: [localhost] => (item={'path': '~/', 'view': 'list'}) => {"changed": true, "cmd": "PYTHONIOENCODING=utf-8 ~/dev/gh/kcrawford/dockutil/scripts/dockutil --add '~/' --view list --display folder --sort name", "delta": "0:00:00.097483", "end": "2015-02-18 19:33:22.112191", "item": {"path": "~/", "view": "list"}, "rc": 0, "start": "2015-02-18 19:33:22.014708", "stderr": "", "stdout": "", "warnings": []}
changed: [localhost] => (item={'sort': 'datemodified', 'path': '~/Downloads', 'view': 'list'}) => {"changed": true, "cmd": "PYTHONIOENCODING=utf-8 ~/dev/gh/kcrawford/dockutil/scripts/dockutil --add '~/Downloads' --view list --display folder --sort datemodified", "delta": "0:00:00.099095", "end": "2015-02-18 19:33:22.288923", "item": {"path": "~/Downloads", "sort": "datemodified", "view": "list"}, "rc": 0, "start": "2015-02-18 19:33:22.189828", "stderr": "", "stdout": "", "warnings": []}
PLAY RECAP ********************************************************************
localhost : ok=5 changed=2 unreachable=0 failed=0
imac:ansible nrser$ time ansible-playbook -v all.yaml
PLAY [all] ********************************************************************
GATHERING FACTS ***************************************************************
TASK: [dock | clean dock] *****************************************************
changed: [localhost] => {"changed": true, "cmd": "PYTHONIOENCODING=utf-8 ~/dev/gh/kcrawford/dockutil/scripts/dockutil --remove all", "delta": "0:00:00.092592", "end": "2015-02-18 19:33:29.696049", "rc": 0, "start": "2015-02-18 19:33:29.603457", "stderr": "", "stdout": "", "warnings": []}
TASK: [dock | add apps] *******************************************************
skipping: [localhost] => (item=apps)
TASK: [dock | add folders] ****************************************************
changed: [localhost] => (item={'path': '/Applications', 'view': 'list'}) => {"changed": true, "cmd": "PYTHONIOENCODING=utf-8 ~/dev/gh/kcrawford/dockutil/scripts/dockutil --add '/Applications' --view list --display folder --sort name", "delta": "0:00:00.100975", "end": "2015-02-18 19:33:29.917863", "item": {"path": "/Applications", "view": "list"}, "rc": 0, "start": "2015-02-18 19:33:29.816888", "stderr": "", "stdout": "", "warnings": []}
changed: [localhost] => (item={'path': '~/', 'view': 'list'}) => {"changed": true, "cmd": "PYTHONIOENCODING=utf-8 ~/dev/gh/kcrawford/dockutil/scripts/dockutil --add '~/' --view list --display folder --sort name", "delta": "0:00:00.097106", "end": "2015-02-18 19:33:30.092658", "item": {"path": "~/", "view": "list"}, "rc": 0, "start": "2015-02-18 19:33:29.995552", "stderr": "", "stdout": "", "warnings": []}
changed: [localhost] => (item={'sort': 'datemodified', 'path': '~/Downloads', 'view': 'list'}) => {"changed": true, "cmd": "PYTHONIOENCODING=utf-8 ~/dev/gh/kcrawford/dockutil/scripts/dockutil --add '~/Downloads' --view list --display folder --sort datemodified", "delta": "0:00:00.097929", "end": "2015-02-18 19:33:30.265187", "item": {"path": "~/Downloads", "sort": "datemodified", "view": "list"}, "rc": 0, "start": "2015-02-18 19:33:30.167258", "stderr": "", "stdout": "", "warnings": []}
PLAY RECAP ********************************************************************
localhost : ok=4 changed=2 unreachable=0 failed=0