classroom/roles/macroom/tasks/main.yml

47 lines
1.4 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: Show username text box on login screen
command: defaults write /Library/Preferences/com.apple.loginwindow SHOWFULLNAME -bool true
changed_when: false
# domain join with (AD user must have permission to add computers):
# sudo dsconfigad -domain fri1.uni-lj.si -username <AD user> -alldomains enable -force
- 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