@installdoc/ansible-gas-station
Version:
An Ansible playbook that provisions your network with software from GitHub Awesome lists, developed with disaster recovery in mind ⛽🔥🤤
24 lines (21 loc) • 691 B
YAML
- name: Temporarily enable passwordless sudo for the ansible_user
lineinfile:
dest: /etc/sudoers
regexp: '^{{ homebrew_install_user }}'
line: '{{ homebrew_install_user }} ALL=(ALL) NOPASSWD: ALL'
state: present
validate: 'visudo -cf %s'
mode: 0644
when: homebrew_temporary_passwordless_sudo
- name: Install Homebrew if not already installed
include_tasks: install-Darwin.yml
- name: Re-enable sudo with password
lineinfile:
dest: /etc/sudoers
regexp: '^{{ homebrew_install_user }}'
line: '{{ homebrew_install_user }} ALL=(ALL) ALL'
state: present
validate: 'visudo -cf %s'
mode: 0644
when: homebrew_temporary_passwordless_sudo