2017-02-01 17:52:51 +00:00
|
|
|
---
|
2017-06-01 15:08:35 +00:00
|
|
|
# If the user installs GNU sed through homebrew the path is different.
|
|
|
|
- name: Register path to sed.
|
|
|
|
command: which sed
|
|
|
|
register: sed_which_result
|
|
|
|
changed_when: false
|
|
|
|
when: sed_path is undefined
|
|
|
|
|
|
|
|
- name: Define sed_path variable.
|
|
|
|
set_fact:
|
|
|
|
sed_path: "{{ sed_which_result.stdout }}"
|
|
|
|
when: sed_path is undefined
|
|
|
|
|
2020-09-29 01:20:52 +00:00
|
|
|
# Sudoers configuration.
|
2017-02-01 17:52:51 +00:00
|
|
|
- name: Copy sudoers configuration into place.
|
2020-09-29 01:20:52 +00:00
|
|
|
copy:
|
|
|
|
content: "{{ sudoers_custom_config }}"
|
|
|
|
dest: /private/etc/sudoers.d/custom
|
2017-02-01 17:52:51 +00:00
|
|
|
mode: 0440
|
|
|
|
validate: 'visudo -cf %s'
|
2020-11-09 23:04:42 +00:00
|
|
|
become: true
|