I running HCL Packer to create Ubuntu 22.04 LTS image. I'm using ansible-local
provisioner. The ansible playbook has following tasks (besides many others):
share_path: "/var/my_nfs"
tasks:
- name: Create Share Directory
become: yes
file:
path: "{{ share_path }}"
state: directory
mode: 777
recurse: yes
- name: Ensure share directory has correct permissions.
become: true
file:
path: "{{ share_path }}"
state: directory
owner: www-data
group: www-data
- name: Mount File Share
become: yes
command: mount -t cifs //{{ storage_account_name }}.file.core.windows.net/{{ file_share_name }} {{ share_path }} -o "username={{ storage_account_name }},password={{ storage_account_key }},dir_mode=0777,file_mode=0777,serverino,uid=www-data,gid=www-data"
This last task is giving me hard time. I'm consistently getting the following error:
"mount error(13): Permission denied",
"Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)"
I have checked many times, the storage_account_name
, file_share_name
, storage_account_key
are all correct.
I have checked connectivity over 445 port to the file share that is working as well.
Any clue what I'm missing here?