{"action":"opened","issue":{"url":"https://api.github.com/repos/MapStory/mapstory-geonode/issues/70","labels_url":"https://api.github.com/repos/MapStory/mapstory-geonode/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/MapStory/mapstory-geonode/issues/70/comments","events_url":"https://api.github.com/repos/MapStory/mapstory-geonode/issues/70/events","html_url":"https://github.com/MapStory/mapstory-geonode/issues/70","id":92444690,"number":70,"title":"Git logic in the ansible scripts should be idempotent.","user":{"login":"garnertb","id":1141646,"avatar_url":"https://avatars.githubusercontent.com/u/1141646?v=3","gravatar_id":"","url":"https://api.github.com/users/garnertb","html_url":"https://github.com/garnertb","followers_url":"https://api.github.com/users/garnertb/followers","following_url":"https://api.github.com/users/garnertb/following{/other_user}","gists_url":"https://api.github.com/users/garnertb/gists{/gist_id}","starred_url":"https://api.github.com/users/garnertb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garnertb/subscriptions","organizations_url":"https://api.github.com/users/garnertb/orgs","repos_url":"https://api.github.com/users/garnertb/repos","events_url":"https://api.github.com/users/garnertb/events{/privacy}","received_events_url":"https://api.github.com/users/garnertb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-01T17:46:49Z","updated_at":"2015-07-01T17:46:49Z","closed_at":null,"body":"If the developer is syncing a folder between the host and guest vm, the ansible scripts will fail when trying to clone the mapstory repos.  Those tasks (mapstory.yml lines 14:29) should only run when the path does not already exist.\r\n\r\nThis seems like pattern to check if a path exists. (from https://groups.google.com/forum/#!topic/ansible-project/ifi8_8FTKVo)\r\n```\r\n- name: Check if path exists\r\n stat: path=/etc/monit/conf.d\r\n register: check_path\r\n\r\n- name: It exists\r\n debug: msg='Yay, the path exists!'\r\n when: check_path.stat.exists\r\n\r\n- name: It doesn't exist\r\n debug: msg=\"Boohoo, the path doesn't exist...\"\r\n when: check_path.stat.exists == false\r\n```"}}