Fixes #29: Split out custom preferences-related tasks to make them configurable.

This commit is contained in:
Jeff Geerling 2017-02-01 11:52:51 -06:00
parent f34f1a1f18
commit 0a07340e9c
5 changed files with 23 additions and 19 deletions

View file

@ -2,7 +2,7 @@
downloads: ~/.ansible-downloads/
configure_sudoers: yes
configure_prefs: yes
configure_terminal: yes
configure_osx: yes
dotfiles_repo: https://github.com/geerlingguy/dotfiles.git

View file

@ -18,11 +18,12 @@
tasks:
- include: tasks/ansible-setup.yml
- include: tasks/preferences.yml
when: configure_prefs
# TODO: Use sudo once .osx can be run via root with no user interaction.
- name: Run .osx dotfiles.
shell: ~/.osx --no-restart
changed_when: false
- include: tasks/sudoers.yml
when: configure_sudoers
- include: tasks/terminal.yml
when: configure_terminal
- include: tasks/osx.yml
when: configure_osx

5
tasks/osx.yml Normal file
View file

@ -0,0 +1,5 @@
---
# TODO: Use sudo once .osx can be run via root with no user interaction.
- name: Run .osx dotfiles.
shell: ~/.osx --no-restart
changed_when: false

10
tasks/sudoers.yml Normal file
View file

@ -0,0 +1,10 @@
---
# Sudoers configuration (enables more convenient Vagrant usage).
- name: Copy sudoers configuration into place.
copy:
src: files/etc/sudoers
dest: /etc/sudoers
mode: 0440
validate: 'visudo -cf %s'
become: yes
when: configure_sudoers

View file

@ -19,15 +19,3 @@
- defaults write com.apple.terminal 'Startup Window Settings' -string JJG-Term
changed_when: false
when: "'JJG-Term' not in terminal_theme.stdout"
# Sudoers configuration (enables more convenient Vagrant usage).
- name: Copy sudoers configuration into place.
copy:
src: files/etc/sudoers
dest: /etc/sudoers
mode: 0440
validate: 'visudo -cf %s'
become: yes
when: configure_sudoers
# TODO: Configure Sublime Text (see templates/sublime/*).