I an creating a "recovery" ansible playbook, and I need to link to a read-only share on the backup machine so I can copy files.
The share on the backup machine is //io.hcs/backup
. In windows this opens
just fine.
I have tried every ansible.posix.mount set up I can think of.
I currently have
- name: Open share on io.
ansible.posix.mount:
src: "//io.hcs/backup"
path: "/home/ian/backup"
state: "present"
fstype: "cifs"
opts: "username=ian,password=<redacted>"
delegate_to: 127.0.0.1
This is run with become=yes
. The task does not error, and always reports changed. However it does not mount the share (the directory remains empty).
Both machines are Ubuntu 20.04, with all the latest patches. The hosts file contains the necessary entries. ufw has allow samba on both machines (which includes the old ports as well as 445)
I have the first account (ian, 1000) on both machines, with the same password on each.
So what might be going wrong?
mount
,df -h
) ... Your question is missing debugging info to be answered.