classroom/roles/macroom/tasks/main.yml

40 lines
1.1 KiB
YAML

- name: Set hostname
hostname:
name: '{{ inventory_hostname }}'
- name: Set brew paths
lineinfile:
path: '{{ item }}'
line: 'eval "$(/opt/homebrew/bin/brew shellenv)"'
loop:
- /etc/profile
- /etc/zprofile
- name: Disable SSH password authentication
copy:
dest: /etc/ssh/sshd_config.d/ansible.conf
src: sshd.conf
notify: reload sshd
- name: Enable passwordless sudo
community.general.sudoers:
name: passwordless
group: admin
commands: ALL
- name: Download R
get_url:
url: https://cran.r-project.org/bin/macosx/base/R-4.2.1.pkg
dest: /tmp/R-4.2.1.pkg
- name: install R
shell: installer -pkg /tmp/R-4.2.1.pkg -target /
- name: Download RStudio
get_url:
url: https://download1.rstudio.org/desktop/macos/RStudio-2022.07.2-576.dmg
dest: /tmp/RStudio-2022.07.2-576.dmg
- name: mount RStudio .dmg
shell: hdiutil attach /tmp/RStudio-2022.07.2-576.dmg
- name: install RStudio
shell: cp -a /Volumes/RStudio-2022.07.2-576 /Volumes/Applications
- name: umount RStudio .dmg
shell: hdiutil detach /Volumes/RStudio-2022.07.2-576