{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1942","repository_url":"https://api.github.com/repos/ansible/ansible-modules-core","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1942/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1942/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1942/events","html_url":"https://github.com/ansible/ansible-modules-core/issues/1942","id":102097963,"number":1942,"title":"Mount state=mounted opts=bind mounts on every run","user":{"login":"rbu","id":65913,"avatar_url":"https://avatars.githubusercontent.com/u/65913?v=3","gravatar_id":"","url":"https://api.github.com/users/rbu","html_url":"https://github.com/rbu","followers_url":"https://api.github.com/users/rbu/followers","following_url":"https://api.github.com/users/rbu/following{/other_user}","gists_url":"https://api.github.com/users/rbu/gists{/gist_id}","starred_url":"https://api.github.com/users/rbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbu/subscriptions","organizations_url":"https://api.github.com/users/rbu/orgs","repos_url":"https://api.github.com/users/rbu/repos","events_url":"https://api.github.com/users/rbu/events{/privacy}","received_events_url":"https://api.github.com/users/rbu/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/P3","name":"P3","color":"fef2c0"},{"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":11,"created_at":"2015-08-20T09:19:02Z","updated_at":"2016-09-12T21:01:31Z","closed_at":null,"body":"##### Issue Type: Bug Report\r\n\r\n##### Ansible Version: 1.8.4 and 1.9.2\r\n\r\n##### Ansible Configuration: \r\n```\r\n[ssh_connection]\r\npipelining = True\r\n\r\n[defaults]\r\nhash_behaviour = merge\r\n```\r\n\r\n##### Environment:\r\nRunning on Linux / Python 2.7.8. Target is CentOS 7.\r\n\r\n\r\n##### Summary:\r\nRunning a bind mount task will mount the directory every time it is run, creating *two* mtab entries.\r\n\r\n##### Steps To Reproduce:\r\nGiven the following task:\r\n```\r\n- mount: opts=bind fstype=none state=mounted name=/dest src=/src\r\n```\r\n\r\nRun it twice.\r\n\r\n##### Expected Results:\r\n1. There is one entry in fstab:\r\n```/src /dest none bind 0 0```\r\n\r\n2. There is one ```mount```:\r\n```/dev/sda1 on /dest type btrfs (rw,relatime,ssd,space_cache)```\r\n\r\n##### Actual Results:\r\n1. There is one entry in fstab:\r\n```/src /dest none bind 0 0```\r\n\r\n2. There are three ```mount```s:\r\n```\r\n/dev/sda1 on /dest type btrfs (rw,relatime,ssd,space_cache)\r\n/dev/sda1 on /dest type btrfs (rw,relatime,ssd,space_cache)\r\n/dev/sda1 on /src type btrfs (rw,relatime,ssd,space_cache)\r\n```\r\n\r\n##### Notes:\r\nThis is a re-occurrence of #86. Note that [https://github.com/ansible/ansible-modules-core/blob/6a872469fc1bda54126dfa91338cf7a26bde701c/system/mount.py#L359](the special case exactly for this) that was introduced in #49 expects ```mount -l``` to output the source path. This does not reliably work with all distributions. Some versions/configurations of util-linux do not keep the source path in /etc/mtab, as is seen in the ```mount``` output above.\r\n\r\nNote that ```findmnt``` lists this:\r\n```\r\nTARGET                                                          SOURCE             FSTYPE      OPTIONS\r\n...\r\n/                                                               /dev/sda1          btrfs       rw,relatime,ssd,space_cache\r\n...\r\n├─/dest                                                         /dev/sda1[/src]    btrfs       rw,relatime,ssd,space_cache\r\n│ └─/dest                                                       /dev/sda1[/src]    btrfs       rw,relatime,ssd,space_cache\r\n└─/src                                                          /dev/sda1[/src]    btrfs       rw,relatime,ssd,space_cache\r\n```"},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/comments/246492034","html_url":"https://github.com/ansible/ansible-modules-core/issues/1942#issuecomment-246492034","issue_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1942","id":246492034,"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-09-12T21:01:31Z","updated_at":"2016-09-12T21:01:31Z","body":"@grossws, ping. This issue is still waiting on your response.\n[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)\n<!--- boilerplate: issue_renotify_maintainer --->"}}
{"actor":{"display_login":"ansibot"}}