diff --git a/default.config.yml b/default.config.yml index 6af7e2f..4428c1d 100644 --- a/default.config.yml +++ b/default.config.yml @@ -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 diff --git a/main.yml b/main.yml index 5d42ddf..45a4f28 100644 --- a/main.yml +++ b/main.yml @@ -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 diff --git a/tasks/osx.yml b/tasks/osx.yml new file mode 100644 index 0000000..329eba7 --- /dev/null +++ b/tasks/osx.yml @@ -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 diff --git a/tasks/sudoers.yml b/tasks/sudoers.yml new file mode 100644 index 0000000..b249a00 --- /dev/null +++ b/tasks/sudoers.yml @@ -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 diff --git a/tasks/preferences.yml b/tasks/terminal.yml similarity index 71% rename from tasks/preferences.yml rename to tasks/terminal.yml index fab18c2..e94cad1 100644 --- a/tasks/preferences.yml +++ b/tasks/terminal.yml @@ -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/*).