Jelajahi Sumber

add arduini ide installer

vidikon 2 tahun lalu
induk
melakukan
a83c73ed7e
1 mengubah file dengan 40 tambahan dan 25 penghapusan
  1. 40 25
      install-software.yml

+ 40 - 25
install-software.yml

@@ -4,16 +4,17 @@
     release: focal
     winetricks_patch: /usr/bin
     prefix_dir: /usr/prefixes
-    prefix_path: /usr/prefixes/msoffice32
+    prefix_path: /usr/prefixes/msapps
     user_permission: user
+    officepath: /home/vidikon/ANSIBLE/Office2013.tar.gz
   #become: true
   gather_facts: no
   tasks:
-#    - name: Upgrade all packets
-#       become: true
-#      ansible.builtin.apt:
-#        name: "*"
-#        state: latest
+    - name: Upgrade all packets
+       become: true
+      ansible.builtin.apt:
+        name: "*"
+        state: latest
 
     - name: wine (add architecture)
       shell: 
@@ -56,11 +57,11 @@
     - 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: 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 }}"
@@ -71,23 +72,37 @@
       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 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
+          ansible.builtin.shell: env WINEARCH=win32 WINEPREFIX={{ prefix_path }} {{ winetricks_patch }}/winetricks msxml3 msxml4 msxml6 vcrun2015 dotnet40 gdiplus riched30 mfc42 mfc140 vcrun6
           register: libinstall
         - debug: msg="{{ libinstall }}"
 
-    #- 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: Copy Office files
+      become: true
+      block:
+        - name: Copy Offcie 2013 archive file with owner and permission
+          ansible.builtin.copy:
+            src: "{{ officepath }}"
+            dest: /tmp/2013x32.tar.gz
+            owner: "{{ user_permission }}"
+            group: "{{ user_permission }}"
+            mode: u=rw,g=rw,o=r
+        - name: Extract Office.tar.gz into /tmp
+          ansible.builtin.shell: tar xvfz /tmp/2013x32.tar.gz
     
 
-        
+    - name: Install Arduino IDE
+      become: true
+      block:
+        - name: Unarchive a IDE that needs to be downloaded 
+          ansible.builtin.unarchive:
+            src: https://downloads.arduino.cc/arduino-ide/arduino-ide_2.2.1_Linux_64bit.zip
+            dest: /tmp/arduinoide
+            remote_src: yes
+        - name: Run installer Arduino IDE
+          ansible.builin.shell: sh /tmp/arduinoide/install.sh
+        - name: Grant user permission for access ttyACM
+          ansible.builin.shell: usermod -a -G dialout {{ user_permission }}
+