diff --git a/README.md b/README.md index ff7ae7c..225dd44 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,38 @@ -Ansible Role: jotbe.dev_tools -============================= +Role Name +========= + +A brief description of the role goes here. Requirements ------------ +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. + Role Variables -------------- -```yaml -# default variables -enable_sublime_text: yes - -``` +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. Dependencies ------------ +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. + Example Playbook ---------------- -Create a playbook containing e.g.: +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: - - hosts: devvm + - hosts: servers roles: - - { role: jotbe.dev_tools, enable_sublime_text: no } + - { role: username.rolename, x: 42 } License ------- -MIT +BSD Author Information ------------------ -This role was created in 2020 by [Jan Beilicke](https://jotbe.io). - +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/defaults/main.yml b/defaults/main.yml index 83f09f8..d031dcc 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,3 +1,2 @@ --- -# defaults file for jotbe.dev-tools -enable_sublime_text: yes \ No newline at end of file +# defaults file for jotbe.dev-tools \ No newline at end of file diff --git a/tasks/main.yml b/tasks/main.yml index 70bc39d..c4021ff 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,9 +1,26 @@ --- # tasks file for jotbe.dev-tools -- name: Install Sublime Text +- name: Provide dev-tools (on Debian) include_tasks: - file: sublime_text_{{ ansible_facts['os_family'] | lower }}.yml + file: sublime_text_debian.yml apply: tags: - sublime_text - when: enable_sublime_text + when: ansible_facts['os_family'] == 'Debian' + +- name: Provide dev-tools (on Debian) + include_tasks: + file: sublime_text_debian.yml + apply: + tags: + - sublime_text + when: ansible_facts['os_family'] == 'Debian' + +- name: Provide dev-tools (on Archlinux) + include_tasks: + file: sublime_text_archlinux.yml + apply: + tags: + - sublime_text + when: + - ansible_facts['os_family'] == 'Archlinux'