Figured it out; the playbook was trying to make the directory permission 
0755 when the mounted fs is 0555.

On Thursday, February 15, 2018 at 6:33:52 PM UTC-5, leam hall wrote:
>
> I'm creating a mount point for an ISO image, and a later task puts the 
> mount point in fstab. Why is the file module erroring after the ISO is 
> mounted? The directory exists so the task shouldn't try to recreate it.
>
> ###
>
> 148     - name: make_build_repo_dir
> 149       file:
> 150         path:   /var/www/html/repo/centos/6/os
> 151         state:  directory
> 152         owner:  root
> 153         group:  root
> 154         mode:   0755
> 155         
> 156     - name: iso_image_to_fstab
> 157       lineinfile:
> 158         path:   /etc/fstab
> 159         state:  present
> 160         regexp: '^/opt/iso/CentOS-6-minimal.iso'
> 161         line:   '/opt/iso/CentOS-6-minimal.iso 
> /var/www/html/repo/centos/6/os iso9660 rw,loop=/dev/loop0 0 0'
> 162 
> 163     - name: mount_iso_image
> 164       mount:
> 165         path:   /var/www/html/repo/centos/6/os
> 166         state:  mounted
> 167         fstype: iso9660
> 168         src:    /opt/iso/CentOS-6-minimal.iso
> 169 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/dd1c8744-ac34-4cf4-ac7e-2f2247ca45cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to