Skip to content

Commit 0a07340

Browse files
committed
Fixes geerlingguy#29: Split out custom preferences-related tasks to make them configurable.
1 parent f34f1a1 commit 0a07340

File tree

5 files changed

+23
-19
lines changed

5 files changed

+23
-19
lines changed

default.config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
downloads: ~/.ansible-downloads/
33

44
configure_sudoers: yes
5-
configure_prefs: yes
5+
configure_terminal: yes
66
configure_osx: yes
77

88
dotfiles_repo: https://github.com/geerlingguy/dotfiles.git

main.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@
1818

1919
tasks:
2020
- include: tasks/ansible-setup.yml
21-
- include: tasks/preferences.yml
22-
when: configure_prefs
2321

24-
# TODO: Use sudo once .osx can be run via root with no user interaction.
25-
- name: Run .osx dotfiles.
26-
shell: ~/.osx --no-restart
27-
changed_when: false
22+
- include: tasks/sudoers.yml
23+
when: configure_sudoers
24+
25+
- include: tasks/terminal.yml
26+
when: configure_terminal
27+
28+
- include: tasks/osx.yml
2829
when: configure_osx

tasks/osx.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
# TODO: Use sudo once .osx can be run via root with no user interaction.
3+
- name: Run .osx dotfiles.
4+
shell: ~/.osx --no-restart
5+
changed_when: false

tasks/sudoers.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
# Sudoers configuration (enables more convenient Vagrant usage).
3+
- name: Copy sudoers configuration into place.
4+
copy:
5+
src: files/etc/sudoers
6+
dest: /etc/sudoers
7+
mode: 0440
8+
validate: 'visudo -cf %s'
9+
become: yes
10+
when: configure_sudoers

tasks/preferences.yml renamed to tasks/terminal.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,3 @@
1919
- defaults write com.apple.terminal 'Startup Window Settings' -string JJG-Term
2020
changed_when: false
2121
when: "'JJG-Term' not in terminal_theme.stdout"
22-
23-
# Sudoers configuration (enables more convenient Vagrant usage).
24-
- name: Copy sudoers configuration into place.
25-
copy:
26-
src: files/etc/sudoers
27-
dest: /etc/sudoers
28-
mode: 0440
29-
validate: 'visudo -cf %s'
30-
become: yes
31-
when: configure_sudoers
32-
33-
# TODO: Configure Sublime Text (see templates/sublime/*).

0 commit comments

Comments
 (0)