playbook.yml 2.69 KB
Newer Older
1
2
3
4
5
6
---
- name: Windows R tools
  hosts: windows10
  tasks:
    - name: ping
      win_ping:
Jean-Francois Rey's avatar
Jean-Francois Rey committed
7
8
9
10
11
    #- name: Install security updates
    #  win_updates:
    #    category_names:
    #      - SecurityUpdates
    #    reboot: yes
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
    - name: copy R script
      win_copy:
        src: ./files/install-r.ps1
        dest: 'C:\Windows\Temp\'
        remote_src: no
    - name: Install R
      win_command: powershell.exe -File C:\Windows\Temp\install-r.ps1
    - name: copy Rtools script
      win_copy:
        src: ./files/install-rtools.ps1
        dest: 'C:\Windows\Temp\'
        remote_src: no
    - name: Install Rtools4
      win_command: powershell.exe -File C:\Windows\Temp\install-rtools.ps1
    - name: copy msys2 config script
      win_copy:
        src: ./files/configure-msys2.sh
        dest: 'C:\Windows\Temp\'
        remote_src: no
    - name: Configure MSYS2
      win_command: C:\Rtools\usr\bin\bash.exe -l C:\Windows\Temp\configure-msys2.sh
    - name: copy msys2 sshd install script
      win_copy:
        src: ./files/install-msys2-sshd.sh
        dest: 'C:\Windows\Temp\'
        remote_src: no
    - name: Install MSYS2 ssh deamon
      win_command: C:\Rtools\usr\bin\bash.exe -l C:\Windows\Temp\install-msys2-sshd.sh
    - name: Enable Firewall for sshd
      win_shell: |
        netsh advfirewall firewall add rule name="SSHD" dir=in action=allow service=msys2_sshd enable=yes
        netsh advfirewall firewall add rule name="SSHD" dir=in action=allow program="C:\Rtools\usr\bin\sshd.exe" enable=yes
        netsh advfirewall firewall add rule name="ssh" dir=in action=allow protocol=TCP localport=22
    - name: copy R packages script
      win_copy:
        src: ./files/install-r-packages.sh
        dest: 'C:\Windows\Temp\'
        remote_src: no
    - name: Install R packages
      win_command: C:\Rtools\usr\bin\bash.exe -l C:\Windows\Temp\install-r-packages.sh
    - name: copy GitLab install script
      win_copy:
        src: ./files/install-gitlab-runner.ps1
        dest: 'C:\Windows\Temp\'
        remote_src: no
    - name: Install GitLab Runner
      win_command: powershell.exe -File C:\Windows\Temp\install-gitlab-runner.ps1
    - name: copy MiKTeX install script
      win_copy:
        src: ./files/install-miktex.ps1
        dest: 'C:\Windows\Temp\'
        remote_src: no
    - name: Install MiKTeX
      win_command: powershell.exe -File C:\Windows\Temp\install-miktex.ps1
    - name: copy pandoc install script
      win_copy:
        src: ./files/install-pandoc.ps1
        dest: 'C:\Windows\Temp\'
        remote_src: no
    - name: Install Pandoc
      win_command: powershell.exe -File C:\Windows\Temp\install-pandoc.ps1
Jean-Francois Rey's avatar
Jean-Francois Rey committed
73
    - name: Clean
Jean-Francois Rey's avatar
Jean-Francois Rey committed
74
      win_command: cmd.exe /c DEL /F/Q/S C:\Windows\Temp\*.*
75
76