Skip to content

Commit

Permalink
Consistency changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tersmitten committed Sep 2, 2015
1 parent c488c1a commit 25a3acf
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 15 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ install:
# Install Ansible.
- if [ "$ANSIBLE_VERSION" = "latest" ]; then pip install ansible; else pip install ansible==$ANSIBLE_VERSION; fi

# Add ansible.cfg to pick up roles path.
- printf "[defaults]\nroles_path = ../" > ansible.cfg

script:
# Check the role/playbook's syntax.
- ansible-playbook -i tests/inventory tests/test.yml --syntax-check
Expand Down
2 changes: 0 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

role = File.basename(File.expand_path(File.dirname(__FILE__)))

File.open(File.dirname(__FILE__) + '/ansible.cfg', 'w') { |f| f.write("[defaults]\nroles_path = ../") }

boxes = [
{
:name => "ubuntu-1204",
Expand Down
10 changes: 6 additions & 4 deletions tasks/install.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# tasks file for r
---
- name: install dependencies
- name: install | dependencies
apt:
name: "{{ item }}"
state: latest
update_cache: true
cache_valid_time: 3600
with_items: r_dependencies
when: "item | trim != ''"
tags: [configuration, r, r-dependencies]
tags:
- r-install-dependencies

- name: install
- name: install | additional
apt:
name: "{{ item }}"
state: latest
with_items: r_install
tags: [configuration, r, r-install]
tags:
- r-install-additional
9 changes: 9 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# tasks file for r
---
- include: repository.yml
tags:
- configuration
- r
- r-repository

- include: install.yml
tags:
- configuration
- r
- r-install
10 changes: 6 additions & 4 deletions tasks/repository.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# tasks file for r
---
- name: add public key
- name: repository | add public key
apt_key:
id: E084DAB9
keyserver: keyserver.ubuntu.com
state: present
tags: [configuration, r, r-public-key]
tags:
- r-repository-public-key

- name: add cran-r repository
- name: repository | add cran-r
apt_repository:
repo: "{{ item.type }} {{ item.url }}"
state: present
update_cache: yes
with_items: r_repository
tags: [configuration, r, r-repository]
tags:
- r-repository-add
2 changes: 1 addition & 1 deletion tests/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- hosts: localhost
remote_user: root
roles:
- ansible-r
- ../../
vars:
r_install:
- littler
2 changes: 1 addition & 1 deletion tests/vagrant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
remote_user: vagrant
sudo: true
roles:
- r
- ../../

0 comments on commit 25a3acf

Please sign in to comment.