mirror of
https://github.com/geerlingguy/mac-dev-playbook
synced 2024-11-24 21:03:26 +00:00
dingen
This commit is contained in:
parent
5d5b39588d
commit
01c1e0d2a1
7 changed files with 66 additions and 42 deletions
|
@ -1,3 +1,5 @@
|
|||
[defaults]
|
||||
nocows = True
|
||||
roles_path = ./roles:/etc/ansible/roles
|
||||
inventory = inventory
|
||||
become = true
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
downloads: ~/.ansible-downloads/
|
||||
|
||||
configure_dotfiles: true
|
||||
configure_terminal: true
|
||||
configure_terminal: false
|
||||
configure_osx: true
|
||||
|
||||
configure_sudoers: false
|
||||
|
@ -12,7 +12,7 @@ sudoers_custom_config: ''
|
|||
# # Allow users in admin group to use sudo with no password.
|
||||
# %admin ALL=(ALL) NOPASSWD: ALL
|
||||
|
||||
dotfiles_repo: https://github.com/geerlingguy/dotfiles.git
|
||||
dotfiles_repo: https://github.com/dspolleke/dotfiles.git
|
||||
dotfiles_repo_accept_hostkey: true
|
||||
dotfiles_repo_local_destination: ~/Development/GitHub/dotfiles
|
||||
dotfiles_files:
|
||||
|
@ -83,15 +83,15 @@ composer_packages: []
|
|||
# - name: drush
|
||||
# state: present # present/absent, default: present
|
||||
# version: "^8.1" # default: N/A
|
||||
gem_packages: []
|
||||
# - name: bundler
|
||||
gem_packages:
|
||||
- name: showoff
|
||||
# state: present # present/absent/latest, default: present
|
||||
# version: "~> 1.15.1" # default: N/A
|
||||
npm_packages: []
|
||||
# - name: webpack
|
||||
# state: present # present/absent/latest, default: present
|
||||
# version: "^2.6" # default: N/A
|
||||
pip_packages: []
|
||||
#pip_packages: []
|
||||
# - name: mkdocs
|
||||
# state: present # present/absent/latest, default: present
|
||||
# version: "0.16.3" # default: N/A
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[all]
|
||||
127.0.0.1 ansible_connection=local
|
||||
#127.0.0.1 ansible_connection=local
|
||||
192.168.2.49
|
||||
|
|
8
main.yml
8
main.yml
|
@ -36,6 +36,14 @@
|
|||
|
||||
- include_tasks: tasks/extra-packages.yml
|
||||
tags: ['extra-packages']
|
||||
- name: Install global Ruby gems.
|
||||
gem:
|
||||
name: "{{ item.name | default(item) }}"
|
||||
state: "{{ item.state | default('present') }}"
|
||||
version: "{{ item.version | default(omit) }}"
|
||||
user_install: false
|
||||
executable: "{{ item.executable | default(omit) }}"
|
||||
loop: "{{ gem_packages }}"
|
||||
|
||||
- name: Run configured post-provision ansible task files.
|
||||
include_tasks: "{{ outer_item }}"
|
||||
|
|
|
@ -3,3 +3,5 @@ roles:
|
|||
- name: geerlingguy.dotfiles
|
||||
- name: geerlingguy.homebrew
|
||||
- name: geerlingguy.mas
|
||||
collections:
|
||||
- name: community.general
|
||||
|
|
|
@ -1,34 +1,38 @@
|
|||
---
|
||||
- name: Install global Composer packages.
|
||||
composer:
|
||||
command: "{{ (item.state | default('present') == 'absent') | ternary('remove', 'require') }}"
|
||||
arguments: "{{ item.name | default(item) }} {{ item.version | default('@stable') }}"
|
||||
# Ansible 2.4 supports `global_command` making `working_dir` optional.
|
||||
working_dir: "{{ lookup('env', 'COMPOSER_HOME') | default('~/.composer', true) }}"
|
||||
with_items: "{{ composer_packages }}"
|
||||
|
||||
- name: Install global NPM packages.
|
||||
npm:
|
||||
name: "{{ item.name | default(item) }}"
|
||||
state: "{{ item.state | default('present') }}"
|
||||
version: "{{ item.version | default(omit) }}"
|
||||
global: true
|
||||
executable: "{{ item.executable | default(omit) }}"
|
||||
with_items: "{{ npm_packages }}"
|
||||
|
||||
- name: Install global Pip packages.
|
||||
pip:
|
||||
name: "{{ item.name | default(item) }}"
|
||||
state: "{{ item.state | default('present') }}"
|
||||
version: "{{ item.version | default(omit) }}"
|
||||
executable: "{{ item.executable | default(omit) }}"
|
||||
with_items: "{{ pip_packages }}"
|
||||
|
||||
- name: Install global Ruby gems.
|
||||
gem:
|
||||
name: "{{ item.name | default(item) }}"
|
||||
state: "{{ item.state | default('present') }}"
|
||||
version: "{{ item.version | default(omit) }}"
|
||||
user_install: false
|
||||
executable: "{{ item.executable | default(omit) }}"
|
||||
with_items: "{{ gem_packages }}"
|
||||
- name: Ensure extra packages are installed
|
||||
block:
|
||||
- name: Install global Composer packages.
|
||||
composer:
|
||||
command: "{{ (item.state | default('present') == 'absent') | ternary('remove', 'require') }}"
|
||||
arguments: "{{ item.name | default(item) }} {{ item.version | default('@stable') }}"
|
||||
# Ansible 2.4 supports `global_command` making `working_dir` optional.
|
||||
working_dir: "{{ lookup('env', 'COMPOSER_HOME') | default('~/.composer', true) }}"
|
||||
loop: "{{ composer_packages }}"
|
||||
|
||||
- name: Install global NPM packages.
|
||||
ansible.builtin.npm:
|
||||
name: "{{ item.name | default(item) }}"
|
||||
state: "{{ item.state | default('present') }}"
|
||||
version: "{{ item.version | default(omit) }}"
|
||||
global: true
|
||||
executable: "{{ item.executable | default(omit) }}"
|
||||
loop: "{{ npm_packages }}"
|
||||
|
||||
- name: Install global Pip packages.
|
||||
ansible.builtin.pip:
|
||||
name: "{{ item.name | default(item) }}"
|
||||
state: "{{ item.state | default('present') }}"
|
||||
version: "{{ item.version | default(omit) }}"
|
||||
executable: "{{ pip_executable | default(omit) }}"
|
||||
loop: "{{ pip_packages }}"
|
||||
|
||||
- name: Install global Ruby gems.
|
||||
ansible.builtin.gem:
|
||||
name: "{{ item.name | default(item) }}"
|
||||
state: "{{ item.state | default('present') }}"
|
||||
version: "{{ item.version | default(omit) }}"
|
||||
user_install: false
|
||||
install_dir: "{{ gem_dir }}"
|
||||
executable: "{{ gem_executable | default(omit) }}"
|
||||
loop: "{{ gem_packages }}"
|
||||
tags: ['extra-packages']
|
||||
|
|
|
@ -6,9 +6,16 @@
|
|||
changed_when: false
|
||||
check_mode: false
|
||||
|
||||
- name: Ensure custom Terminal profile is added.
|
||||
command: open files/terminal/JJG-Term.terminal
|
||||
changed_when: false
|
||||
- name: ensure JJG-Term
|
||||
block:
|
||||
- name: transfer the file
|
||||
copy:
|
||||
src: files/terminal/JJG-Term.terminal
|
||||
dest: /tmp/JJG-Term.terminal
|
||||
|
||||
- name: Ensure custom Terminal profile is added.
|
||||
command: open /tmp/JJG-Term.terminal
|
||||
changed_when: false
|
||||
when: "'JJG-Term' not in terminal_theme.stdout"
|
||||
|
||||
# TODO: This doesn't work in Yosemite. Consider a different solution?
|
||||
|
|
Loading…
Reference in a new issue