copy-office-2010.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. ---
  2. - hosts: kc41
  3. vars:
  4. release: focal
  5. winetricks_patch: /usr/bin
  6. prefix_dir: /usr/prefixes
  7. prefix_path: /usr/prefixes/msapps2010
  8. user_permission: oktadmin
  9. officepath: /home/vidikon/ANSIBLE/2010.Office.exe
  10. #become: true
  11. gather_facts: no
  12. tasks:
  13. - name: Copy Office files
  14. become: true
  15. block:
  16. # - name: Copy Offcie 2010 archive file with owner and permission
  17. # ansible.builtin.copy:
  18. # src: "{{ officepath }}"
  19. # dest: /tmp/Office2010.exe
  20. # owner: "{{ user_permission }}"
  21. # group: "{{ user_permission }}"
  22. # mode: u=rw,g=rw,o=r
  23. - name: Copy winetrics file with owner and permission
  24. ansible.builtin.copy:
  25. src: "/home/vidikon/ANSIBLE/software-playbooks/scripts/winetricks"
  26. owner: "{{ user_permission }}"
  27. group: "{{ user_permission }}"
  28. dest: /usr/bin/winetricks
  29. mode: u=rwx,g=rwx,o=wr
  30. - name: Create prefix
  31. block:
  32. - name: Create a directory if it does not exist
  33. become: true
  34. ansible.builtin.file:
  35. path: "{{ prefix_dir }}"
  36. owner: "{{ user_permission }}"
  37. group: "{{ user_permission }}"
  38. state: directory
  39. - name: Create Office prefix
  40. ansible.builtin.shell: env WINEARCH=win32 WINEPREFIX={{ prefix_path }} wineboot -u
  41. - name: Download font
  42. ansible.builtin.shell: env WINEARCH=win32 WINEPREFIX={{ prefix_path }} {{ winetricks_patch }}/winetricks corefonts allfonts
  43. - name: Download lib
  44. ansible.builtin.shell: env WINEARCH=win32 WINEPREFIX={{ prefix_path }} {{ winetricks_patch }}/winetricks msxml3 msxml4 msxml6 vcrun2015 dotnet40 gdiplus riched30 mfc42 mfc140 vcrun6
  45. register: libinstall
  46. - debug: msg="{{ libinstall }}"