| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- ---
- - hosts: test_group
- vars:
- release: jammy
- winetricks_patch: /usr/bin
- prefix_dir: /usr/prefixes
- prefix_path: /usr/prefixes/msapps
- user_permission: oktadmin
- prefix_user_permission: student
- officepath: /home/vidikon/ANSIBLE/Office2013.tar.gz
- skipstep: false
- #become: true
- gather_facts: no
- tasks:
- - name: upgrade system
- block:
- #- name: dpkg --configure -a
- # become: true
- # ansible.builtin.shell: dpkg --remove --force-remove-reinstreq packettracer
- - name: Upgrade all packets
- become: true
- ansible.builtin.apt:
- name: "*"
- state: latest
- when: skipstep == "true"
- - name: wine (add architecture)
- become: true
- shell:
- cmd: dpkg --add-architecture i386
- when: skipstep == "true"
- - name: install software-properties-common deb
- become: true
- ansible.builtin.apt:
- pkg:
- - software-properties-common
- - dirmngr
- - ca-certificates
- - apt-transport-https
- - curl
- when: skipstep == "true"
-
- - name: One way to avoid apt_key once it is removed from your distro
- become: true
- block:
- - 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
- - name: add repo
- ansible.builtin.apt_repository:
- repo: "deb [signed-by=/usr/share/keyrings/winehq.gpg] http://dl.winehq.org/wine-builds/ubuntu/ {{ release }} main"
- state: present
- - name: install Wine deb
- ansible.builtin.apt:
- pkg:
- - winehq-stable
- - winetricks
- - winbind
- - playonlinux
- - smbclient
- update_cache: yes
- when: skipstep == "true"
- # - name: Copy winetrics file with owner and permission
- # become: true
- # ansible.builtin.copy:
- # src: "./scripts/winetricks"
- # owner: "{{ user_permission }}"
- # group: "{{ user_permission }}"
- # dest: /usr/bin/winetricks
- # mode: u=rwx,g=rwx,o=wrx
- - name: Create prefix dir
- become: true
- block:
- - name: Create a directory if it does not exist
- ansible.builtin.file:
- path: "{{ prefix_dir }}"
- owner: "{{ user_permission }}"
- group: "{{ user_permission }}"
- state: directory
- #when: skipstep == "true"
-
- - name: Create prefix and install lib
- block:
- - name: Create Office prefix
- ansible.builtin.shell: wineboot -u
- - name: Download lib
- ansible.builtin.shell: "{{ winetricks_patch }}/winetricks cmd corefonts msxml6 riched20 gdiplus atmlib msxml3 vcrun2008 vcrun2010 vcrun2012 fontsmooth-rgb gecko"
- register: libinstall
- - debug: msg="{{ libinstall }}"
- environment:
- WINEARCH: win32
- WINEPREFIX: "{{ prefix_path }}"
- # http_proxy: socks5://vidikon:{{ sockspass }}@5.187.2.63:55448
- # https_proxy: socks5://vidikon:{{ sockspass }}@5.187.2.63:55448
-
-
|