Code Monkey home page Code Monkey logo

Comments (5)

jamesgoodhouse avatar jamesgoodhouse commented on June 13, 2024

The original ticket was created on the main project repo but closed when modules were moved to a separate repo. Here is the original ticket: ansible/ansible#7121

from ansible-modules-core.

Jmainguy avatar Jmainguy commented on June 13, 2024

PR that should fix this. #49

from ansible-modules-core.

bcoca avatar bcoca commented on June 13, 2024

so I cannot reproduce this in current development before patching

- hosts: localhost
  sudo: True
  gather_facts: false
  tasks:
    - mount: name=/mnt/test src=/tmp fstype=none opts=bind,rw state=mounted

mounts it only once and creates a single entry in /etc/fstab

from ansible-modules-core.

Jmainguy avatar Jmainguy commented on June 13, 2024

It depends on the target, centos7 doesn't seem to be affected by this bug. Debian 7 does.

Target ns1.example.com

# cat /etc/*release
PRETTY_NAME="Debian GNU/Linux 7 (wheezy)"
NAME="Debian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
ID=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support/"
BUG_REPORT_URL="http://bugs.debian.org/"


[root@phy01 ~]# ansible -i hosts all -m mount -a "name=/mnt/test src=/tmp opts=rw,bind state=mounted fstype=none"                                                                             
ns1.example.com | success >> {
    "changed": true,
    "fstab": "/etc/fstab",
    "fstype": "none",
    "name": "/mnt/test",
    "opts": "rw,bind",
    "src": "/tmp"
}

[root@phy01 ~]# ansible -i hosts all -m mount -a "name=/mnt/test src=/tmp opts=rw,bind state=mounted fstype=none"
ns1.example.com | success >> {
    "changed": true,
    "fstab": "/etc/fstab",
    "fstype": "none",
    "name": "/mnt/test",
    "opts": "rw,bind",
    "src": "/tmp"
}

[root@phy01 ~]# ansible -i hosts all -m mount -a "name=/mnt/test src=/tmp opts=rw,bind state=mounted fstype=none"
ns1.example.com | success >> {
    "changed": true,
    "fstab": "/etc/fstab",
    "fstype": "none",
    "name": "/mnt/test",
    "opts": "rw,bind",
    "src": "/tmp"
}

[root@phy01 ~]# ansible -i hosts all -m mount -a "name=/mnt/test src=/tmp opts=rw,bind state=mounted fstype=none"
ns1.example.com | success >> {
    "changed": true,
    "fstab": "/etc/fstab",
    "fstype": "none",
    "name": "/mnt/test",
    "opts": "rw,bind",
    "src": "/tmp"
}



ns1:~# mount -l
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=14299,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=12460k,mode=755)
/dev/disk/by-uuid/641c7238-38ef-4a20-8775-96d66411bdb7 on / type ext3 (rw,relatime,errors=remount-ro,barrier=1,data=ordered)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=73440k)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
/dev/disk/by-uuid/641c7238-38ef-4a20-8775-96d66411bdb7 on /mnt/test type ext3 (rw,relatime,errors=remount-ro,barrier=1,data=ordered)
/dev/disk/by-uuid/641c7238-38ef-4a20-8775-96d66411bdb7 on /mnt/test type ext3 (rw,relatime,errors=remount-ro,barrier=1,data=ordered)
/dev/disk/by-uuid/641c7238-38ef-4a20-8775-96d66411bdb7 on /mnt/test type ext3 (rw,relatime,errors=remount-ro,barrier=1,data=ordered)
/dev/disk/by-uuid/641c7238-38ef-4a20-8775-96d66411bdb7 on /mnt/test type ext3 (rw,relatime,errors=remount-ro,barrier=1,data=ordered)

from ansible-modules-core.

bcoca avatar bcoca commented on June 13, 2024

closing by merging PR #49

from ansible-modules-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.