As you can see "IOError: [Errno 13] *Permission denied*: '/etc/fstab'", you're executing the playbook with an unprivileged user. Try running the playbook with privileged user or use *become *directive for TASK [Mount vCSA6.7 iso to /mnt/iso directory].
- Ompragash On Tue, 2 Jun 2020 at 00:12, Tony Wong <[email protected]> wrote: > I am trying to deploy new vmware vcsa appliance from iso usibg ansible > > > below is playbook > > --- > - hosts: localhost > vars: > name_iso: VMware-VCSA-all-6.7.0-16046470.iso > tasks: > - name: Creating a Directory to mount the iso file > become: yes > file: > path: /mnt/iso > state: directory > mode: 0777 > - name: Mount vCSA6.7 iso to /mnt/iso directory > mount: > path: /mnt/iso > src: /home/tony/temp/{{name_iso}} > fstype: iso9660 > opts: ro,noauto > state: present > - name: Creating a Working Directory > become: yes > file: > path: /vcsa > state: directory > mode: 0777 > - name: Copying contents to working Directory > template: > src: /mnt/iso/* > dest: /vcsa > - name: deployment of vcsa > shell: ./vcsa-deploy install --no-esx-ssl-verify --accept-eula > --acknowledge-ceip /home/tony/ansible-vmware/vcsa-deploy/config.json > args: > chdir: /VCSA-new/vcsa-cli-installer/lin64/ > > > but its failing on the iso mount part > > > any idea? > > > TASK [Mount vCSA6.7 iso to /mnt/iso directory] > ************************************************************************************************************************************* > An exception occurred during task execution. To see the full traceback, > use -vvv. The error was: IOError: [Errno 13] Permission denied: '/etc/fstab' > fatal: [127.0.0.1]: FAILED! => {"changed": false, "module_stderr": > "Traceback (most recent call last):\n File > \"/home/tony/.ansible/tmp/ansible-tmp-1591036438.98-60861409289967/AnsiballZ_mount.py\", > line 102, in <module>\n _ansiballz_main()\n File > \"/home/tony/.ansible/tmp/ansible-tmp-1591036438.98-60861409289967/AnsiballZ_mount.py\", > line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, > ANSIBALLZ_PARAMS)\n File > \"/home/tony/.ansible/tmp/ansible-tmp-1591036438.98-60861409289967/AnsiballZ_mount.py\", > line 40, in invoke_module\n > runpy.run_module(mod_name='ansible.modules.system.mount', > init_globals=None, run_name='__main__', alter_sys=False)\n File > \"/usr/lib/python2.7/runpy.py\", line 192, in run_module\n fname, > loader, pkg_name)\n File \"/usr/lib/python2.7/runpy.py\", line 72, in > _run_code\n exec code in run_globals\n File > \"/tmp/ansible_mount_payload_ufhUI0/ansible_mount_payload.zip/ansible/modules/system/mount.py\", > line 751, in <module>\n File > \"/tmp/ansible_mount_payload_ufhUI0/ansible_mount_payload.zip/ansible/modules/system/mount.py\", > line 735, in main\n File > \"/tmp/ansible_mount_payload_ufhUI0/ansible_mount_payload.zip/ansible/modules/system/mount.py\", > line 284, in set_mount\n File > \"/tmp/ansible_mount_payload_ufhUI0/ansible_mount_payload.zip/ansible/modules/system/mount.py\", > line 163, in write_fstab\nIOError: [Errno 13] Permission denied: > '/etc/fstab'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee > stdout/stderr for the exact error", "rc": 1} > > > > > > -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/22c83ca2-606e-4d0f-8ed4-22cddeb0a6a5%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/22c83ca2-606e-4d0f-8ed4-22cddeb0a6a5%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAEFccTX2-HH65gouyq-7YZ4Z5m8%2BwpjSvAJyWNFrguNZf3wiuQ%40mail.gmail.com.
