playbook.yml 2.82 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
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
73
74
75
76
77
78
79
80
81
82
83
84
---
- name: Windows R tools
  hosts: windows10
  #remote_user: vagrant
  #vars:
  #  ansible_user: vagrant
  #  ansible_password: vagrant
  #  ansible_connection: winrm
  #  ansible_winrm_transport: basic
  #  ansible_winrm_server_cert_validation: ignore
  tasks:
    - name: ping
      win_ping:
    - name: Install security updates
      win_updates:
        category_names:
          - SecurityUpdates
        use_scheduled_task: yes
    - 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