{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3148","repository_url":"https://api.github.com/repos/ansible/ansible-modules-core","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3148/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3148/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3148/events","html_url":"https://github.com/ansible/ansible-modules-core/issues/3148","id":137386662,"number":3148,"title":"mount is not idempotent for bind mount (Ubuntu 14.04, ansible 2.0.1.0)","user":{"login":"jberkenbilt","id":997128,"avatar_url":"https://avatars.githubusercontent.com/u/997128?v=3","gravatar_id":"","url":"https://api.github.com/users/jberkenbilt","html_url":"https://github.com/jberkenbilt","followers_url":"https://api.github.com/users/jberkenbilt/followers","following_url":"https://api.github.com/users/jberkenbilt/following{/other_user}","gists_url":"https://api.github.com/users/jberkenbilt/gists{/gist_id}","starred_url":"https://api.github.com/users/jberkenbilt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jberkenbilt/subscriptions","organizations_url":"https://api.github.com/users/jberkenbilt/orgs","repos_url":"https://api.github.com/users/jberkenbilt/repos","events_url":"https://api.github.com/users/jberkenbilt/events{/privacy}","received_events_url":"https://api.github.com/users/jberkenbilt/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/waiting_on_maintainer","name":"waiting_on_maintainer","color":"d93f0b"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-02-29T21:48:18Z","updated_at":"2016-07-31T14:44:54Z","closed_at":null,"body":"##### Issue Type:\r\n\r\n - Bug Report\r\n\r\n##### Plugin Name:\r\n\r\nmount\r\n\r\n##### Ansible Version:\r\n\r\n```\r\nansible 2.0.1.0\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = Default w/o overrides\r\n```\r\n\r\n##### Ansible Configuration:\r\n\r\nno changes from default\r\n\r\n##### Environment:\r\n\r\nUbuntu 14.04 control host and target host, but see below for exact steps to reproduce\r\n\r\n##### Summary:\r\n\r\nUsing the mount module to set up and mount a bind mount is not idempotent.\r\n\r\n##### Steps To Reproduce:\r\n\r\nThe following playbook illustrates the problem:\r\n\r\n```\r\n---\r\n- hosts: all\r\n  tasks:\r\n  - file: path=/tmp/1 state=directory\r\n  - file: path=/tmp/2 state=directory\r\n  - mount: src=/tmp/1 name=/tmp/2 fstype=- opts=bind state=mounted\r\n```\r\n\r\nHere's a detailed recipe for reproducing this if you run into trouble.\r\n\r\n* Launch an instance in ec2 off the latest ubuntu trusty AMI. A t2.nano is sufficient\r\n* On the AMI:\r\n\r\n```\r\nsudo -s\r\napt-get -y install software-properties-common\r\napt-add-repository -y ppa:ansible/ansible\r\napt-get update\r\napt-get -y install ansible\r\ncd /tmp\r\ncat >a.yml <<EOF\r\n---\r\n- hosts: all\r\n  tasks:\r\n  - file: path=/tmp/1 state=directory\r\n  - file: path=/tmp/2 state=directory\r\n  - mount: src=/tmp/1 name=/tmp/2 fstype=- opts=bind state=mounted\r\nEOF\r\ncat >local <<EOF\r\n[local]\r\n127.0.0.1 ansible_connection=local\r\nEOF\r\nansible-playbook -i local a.yml\r\nansible-playbook -i local a.yml\r\n```\r\n\r\n##### Expected Results:\r\n\r\nThe second time, nothing should have changed since /tmp/1 is already mounted on /tmp/2\r\n\r\n##### Actual Results:\r\n\r\nThe directory was mounted again. The line:\r\n\r\n```\r\n/tmp/1 on /tmp/2 type none (rw,bind)\r\n```\r\nappears twice in the output of `mount`.\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/comments/236433849","html_url":"https://github.com/ansible/ansible-modules-core/issues/3148#issuecomment-236433849","issue_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3148","id":236433849,"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-07-31T14:44:54Z","updated_at":"2016-07-31T14:44:54Z","body":"<!-- @jberkenbilt: Thanks for filing this bug report! -->\n@grossws ping, this issue is waiting for your response.\n[click here for bot help](https://github.com/jctanner/ansibullbot/blob/ISSUE_TRIAGE_CLASS/ISSUE_HELP.md)\n<!--- boilerplate: issue_bug_new --->"}}
{"actor":{"display_login":"ansibot"}}