install-software.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ---
  2. - hosts: local
  3. vars:
  4. release: focal
  5. become: true
  6. gather_facts: no
  7. tasks:
  8. # - name: Upgrade all packets
  9. # ansible.builtin.apt:
  10. # name: "*"
  11. # state: latest
  12. # - name: wine (add architecture)
  13. # shell:
  14. # cmd: dpkg --add-architecture i386
  15. - name: install software-properties-common deb
  16. ansible.builtin.apt:
  17. pkg:
  18. - software-properties-common
  19. - dirmngr
  20. - ca-certificates
  21. - apt-transport-https
  22. - curl
  23. - name: One way to avoid apt_key once it is removed from your distro
  24. block:
  25. - name: add key
  26. ansible.builtin.shell: curl -s https://dl.winehq.org/wine-builds/winehq.key | sudo gpg --dearmor | sudo tee /usr/share/keyrings/winehq.gpg > /dev/null
  27. #- name: somerepo |no apt key
  28. # ansible.builtin.get_url:
  29. # url: https://dl.winehq.org/wine-builds/winehq.key
  30. # dest: /usr/share/keyrings/winehq.gpg
  31. - name: add repo
  32. ansible.builtin.apt_repository:
  33. repo: "deb [signed-by=/usr/share/keyrings/winehq.gpg] http://dl.winehq.org/wine-builds/ubuntu/ {{ release }} main"
  34. state: present
  35. - name: install Wine deb
  36. ansible.builtin.apt:
  37. pkg:
  38. - wine-stable
  39. - winetricks
  40. update_cache: yes
  41. - name: Copy Offcie 2019 archive file with owner and permission
  42. ansible.builtin.copy:
  43. src: /home/vidikon/2019x64.tar.gz
  44. dest: /tmp/2019x64.tar.gz
  45. owner: user
  46. group: user
  47. mode: u=rw,g=r,o=r
  48. - name: Extract Office.tar.gz into /tmp
  49. ansible.builtin.shell: tar xvfz /tmp/2019x64.tar.gz
  50. - name: Create Office prefix
  51. ansible.builtin.shell: env WINEPREFIX=~/.msoffice wineboot -u