Skip to content

Commit dc18e96

Browse files
author
Roderik van der Veer
committed
Initial
0 parents  commit dc18e96

File tree

6 files changed

+93
-0
lines changed

6 files changed

+93
-0
lines changed

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Role Name
2+
=========
3+
4+
A brief description of the role goes here.
5+
6+
Requirements
7+
------------
8+
9+
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
10+
11+
Role Variables
12+
--------------
13+
14+
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
15+
16+
Dependencies
17+
------------
18+
19+
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
20+
21+
Example Playbook
22+
----------------
23+
24+
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
25+
26+
- hosts: servers
27+
roles:
28+
- { role: username.rolename, x: 42 }
29+
30+
License
31+
-------
32+
33+
BSD
34+
35+
Author Information
36+
------------------
37+
38+
An optional section for the role authors to include contact information, or a website (HTML is not allowed).

defaults/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
# defaults file for ansible-role-sublimetext
3+
4+
sublime_packages: []

handlers/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
# handlers file for ansible-role-sublimetext

meta/main.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
galaxy_info:
3+
author: Roderik van der Veer
4+
description: Ansible role to setup Sublime Text 3
5+
license: MIT
6+
min_ansible_version: 1.2
7+
platforms:
8+
- name: Darwin
9+
versions:
10+
- all
11+
categories:
12+
- system
13+
dependencies:
14+
- homebrew

tasks/main.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
3+
- name: install sublime text 3
4+
homebrew_cask: name=sublime-text3 state=present
5+
6+
- name: create directories
7+
file:
8+
path: "{{item}}"
9+
state: directory
10+
recurse: yes
11+
with_items:
12+
- /Users/{{ lookup('env','USER') }}/Library/Application Support/Sublime Text 3
13+
- /Users/{{ lookup('env','USER') }}/Library/Application Support/Sublime Text 3/Packages
14+
- /Users/{{ lookup('env','USER') }}/Library/Application Support/Sublime Text 3/Packages/User
15+
- /Users/{{ lookup('env','USER') }}/Library/Application Support/Sublime Text 3/Installed Packages
16+
17+
- name: download package control
18+
become: yes
19+
get_url:
20+
url: "{{ item.url }}"
21+
dest: "{{ item.dest }}"
22+
owner: root
23+
group: wheel
24+
mode: 0644
25+
with_items:
26+
- {
27+
url: 'http://sublime.wbond.net/Package%20Control.sublime-package',
28+
dest: /Users/{{ lookup('env','USER') }}/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package
29+
}
30+
31+
- git: update=yes version={{item.version}} repo={{item.repo}} dest=/Users/{{ lookup('env','USER') }}/Library/Application Support/Sublime Text 3/Packages/{{item.dest}}
32+
with_items: sublime_packages
33+

vars/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
# vars file for ansible-role-sublimetext

0 commit comments

Comments
 (0)