Skip to content

TO-249 remove feffi task for macos #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 26, 2024
45 changes: 25 additions & 20 deletions tasks/Darwin.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,37 @@
---
- name: Disable Sleep
- name: Never Sleep Mode
ansible.builtin.command: "{{ item }}"
with_items:
- pmset -a standbydelay 0
- pmset -a displaysleep 0
- pmset -a disablesleep 1
- pmset -a disksleep 0
- pmset -a hibernatemode 0
- pmset disablesleep 1
# Not sure the stuff below works
- systemsetup -setsleep Never
- systemsetup -setharddisksleep Never
- systemsetup -setcomputersleep Never
- systemsetup -setdisplaysleep Never
changed_when: false
become: true

- name: Additional cleanups for never sleep mode
ansible.builtin.include_role:
name: feffi.macos-standby
vars:
standby_delay: false # noqa: var-naming[no-role-prefix]
hibernate_mode: 0 # noqa: var-naming[no-role-prefix]
remove_sleepimage: true # noqa: var-naming[no-role-prefix]

- name: Ensure homebrew is installed
- name: Install Homebrew + kcpassword
ansible.builtin.include_role:
name: geerlingguy.mac.homebrew
vars:
# This is overwritten by our group_vars (cpp.build-machines)
homebrew_taps:
- name: xfreebird/utils
homebrew_installed_packages:
- xfreebird/utils/kcpassword
when: not cpp_buildmachine

- name: Add xfreebird/utils tap for kcpassword
community.general.homebrew_tap:
name: xfreebird/utils
state: present

- name: Add kcpassword utility for autologin
community.general.homebrew:
name: kcpassword
state: present
# - name: Add kcpassword utility for autologin
# community.general.homebrew:
# name: kcpassword
# state: present
# become: true

- name: Set autoLoginUser
community.general.osx_defaults:
Expand All @@ -41,7 +43,10 @@
become: true

- name: Set the autologon password # noqa: no-changed-when
ansible.builtin.command: /usr/local/bin/kcpassword "vagrant"
ansible.builtin.command:
cmd: kcpassword vagrant
environment:
PATH: "/opt/homebrew/bin:/usr/local/bin:{{ ansible_env.PATH }}"
become: true

- name: Set Europe/London time zone
Expand Down
35 changes: 35 additions & 0 deletions vars/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
terraform_ostype: "macos"
ansible_ssh_transfer_method: scp
# ansible_python_interpreter: /usr/local/bin/python3
homebrew_user: vagrant
homebrew_taps:
- name: xfreebird/utils
- name: xcodesorg/made

homebrew_installed_packages:
- kcpassword
- python@3
- git
- svn
- xz
- wget
- jq
- diffutils
- graphviz
- jfrog-cli
- pyenv
- conan@1
- mariadb
- tcl-tk
- libomp
- aria2
- xcodesorg/made/xcodes
- htop
- mc
- ncdu
- dockutil
- p7zip
- zstd
- curl
- openjdk@17
Loading