|
@@ -2,10 +2,15 @@
|
|
|
- hosts: local
|
|
- hosts: local
|
|
|
vars:
|
|
vars:
|
|
|
release: focal
|
|
release: focal
|
|
|
- become: true
|
|
|
|
|
|
|
+ winetricks_patch: /usr/bin/
|
|
|
|
|
+ prefix_dir: /usr/prefixes
|
|
|
|
|
+ prefix_path: /usr/prefixes/msoffice32
|
|
|
|
|
+ user_permission: user
|
|
|
|
|
+ #become: true
|
|
|
gather_facts: no
|
|
gather_facts: no
|
|
|
tasks:
|
|
tasks:
|
|
|
# - name: Upgrade all packets
|
|
# - name: Upgrade all packets
|
|
|
|
|
+# become: true
|
|
|
# ansible.builtin.apt:
|
|
# ansible.builtin.apt:
|
|
|
# name: "*"
|
|
# name: "*"
|
|
|
# state: latest
|
|
# state: latest
|
|
@@ -15,6 +20,7 @@
|
|
|
# cmd: dpkg --add-architecture i386
|
|
# cmd: dpkg --add-architecture i386
|
|
|
|
|
|
|
|
- name: install software-properties-common deb
|
|
- name: install software-properties-common deb
|
|
|
|
|
+ become: true
|
|
|
ansible.builtin.apt:
|
|
ansible.builtin.apt:
|
|
|
pkg:
|
|
pkg:
|
|
|
- software-properties-common
|
|
- software-properties-common
|
|
@@ -25,6 +31,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: One way to avoid apt_key once it is removed from your distro
|
|
- name: One way to avoid apt_key once it is removed from your distro
|
|
|
|
|
+ become: true
|
|
|
block:
|
|
block:
|
|
|
- name: add key
|
|
- name: add key
|
|
|
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
|
|
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
|
|
@@ -39,26 +46,46 @@
|
|
|
repo: "deb [signed-by=/usr/share/keyrings/winehq.gpg] http://dl.winehq.org/wine-builds/ubuntu/ {{ release }} main"
|
|
repo: "deb [signed-by=/usr/share/keyrings/winehq.gpg] http://dl.winehq.org/wine-builds/ubuntu/ {{ release }} main"
|
|
|
state: present
|
|
state: present
|
|
|
|
|
|
|
|
|
|
+ - name: install Wine deb
|
|
|
|
|
+ ansible.builtin.apt:
|
|
|
|
|
+ pkg:
|
|
|
|
|
+ - winehq-stable
|
|
|
|
|
+ ## - winetricks
|
|
|
|
|
+ update_cache: yes
|
|
|
|
|
|
|
|
|
|
+ - name: Create prefix dir
|
|
|
|
|
+ become: true
|
|
|
|
|
+ block:
|
|
|
|
|
+ - name: download winetricks
|
|
|
|
|
+ ansible.builtin.get_url:
|
|
|
|
|
+ url: https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
|
|
|
|
|
+ dest: "{{ winetricks_patch }}/winetricks"
|
|
|
|
|
+ mode: '0775'
|
|
|
|
|
+ - name: Create a directory if it does not exist
|
|
|
|
|
+ ansible.builtin.file:
|
|
|
|
|
+ path: "{{ prefix_dir }}"
|
|
|
|
|
+ owner: "{{ user_permission }}"
|
|
|
|
|
+ group: "{{ user_permission }}"
|
|
|
|
|
+ state: directory
|
|
|
|
|
+ - name: Create prefix
|
|
|
|
|
+ block:
|
|
|
|
|
+ - name: Create Office prefix
|
|
|
|
|
+ ansible.builtin.shell: env WINEARCH=win32 WINEPREFIX={{ prefix_path }} wineboot -u
|
|
|
|
|
+ - name: Download font
|
|
|
|
|
+ ansible.builtin.shell: env WINEARCH=win32 WINEPREFIX={{ prefix_path }} {{ winetricks_patch }}/winetricks corefonts allfonts
|
|
|
|
|
+ - name: Download lib
|
|
|
|
|
+ ansible.builtin.shell: env WINEARCH=win32 WINEPREFIX={{ prefix_path }} {{ winetricks_patch }}/winetricks msxml3 msxml4 msxml6 vcrun2019 gdiplus riched30 mfc140 vcrun6
|
|
|
|
|
|
|
|
- - name: install Wine deb
|
|
|
|
|
- ansible.builtin.apt:
|
|
|
|
|
- pkg:
|
|
|
|
|
- - wine-stable
|
|
|
|
|
- - winetricks
|
|
|
|
|
- update_cache: yes
|
|
|
|
|
-
|
|
|
|
|
- - name: Copy Offcie 2019 archive file with owner and permission
|
|
|
|
|
- ansible.builtin.copy:
|
|
|
|
|
- src: /home/vidikon/2019x64.tar.gz
|
|
|
|
|
- dest: /tmp/2019x64.tar.gz
|
|
|
|
|
- owner: user
|
|
|
|
|
- group: user
|
|
|
|
|
- mode: u=rw,g=r,o=r
|
|
|
|
|
|
|
+ #- name: Copy Offcie 2019 archive file with owner and permission
|
|
|
|
|
+ # ansible.builtin.copy:
|
|
|
|
|
+ # src: /home/vidikon/2019x64.tar.gz
|
|
|
|
|
+ # dest: /tmp/2019x64.tar.gz
|
|
|
|
|
+ # owner: user
|
|
|
|
|
+ # group: user
|
|
|
|
|
+ # mode: u=rw,g=r,o=r
|
|
|
|
|
|
|
|
- - name: Extract Office.tar.gz into /tmp
|
|
|
|
|
- ansible.builtin.shell: tar xvfz /tmp/2019x64.tar.gz
|
|
|
|
|
|
|
+ #- name: Extract Office.tar.gz into /tmp
|
|
|
|
|
+ # ansible.builtin.shell: tar xvfz /tmp/2019x64.tar.gz
|
|
|
|
|
|
|
|
- - name: Create Office prefix
|
|
|
|
|
- ansible.builtin.shell: env WINEPREFIX=~/.msoffice wineboot -u
|
|
|
|
|
|
|
+
|
|
|
|
|
|