From 25a3acfef9c1c5d6be025ddc210407b24681674f Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Wed, 2 Sep 2015 09:59:54 +0200 Subject: [PATCH] Consistency changes --- .travis.yml | 3 --- Vagrantfile | 2 -- tasks/install.yml | 10 ++++++---- tasks/main.yml | 9 +++++++++ tasks/repository.yml | 10 ++++++---- tests/test.yml | 2 +- tests/vagrant.yml | 2 +- 7 files changed, 23 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index f542072..e33f232 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/Vagrantfile b/Vagrantfile index 19b766b..2086048 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -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", diff --git a/tasks/install.yml b/tasks/install.yml index ca85b58..dec0db7 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -1,6 +1,6 @@ # tasks file for r --- -- name: install dependencies +- name: install | dependencies apt: name: "{{ item }}" state: latest @@ -8,11 +8,13 @@ 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 diff --git a/tasks/main.yml b/tasks/main.yml index d051cc9..8ef5f1f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,4 +1,13 @@ # tasks file for r --- - include: repository.yml + tags: + - configuration + - r + - r-repository + - include: install.yml + tags: + - configuration + - r + - r-install diff --git a/tasks/repository.yml b/tasks/repository.yml index 43c1815..b0c4862 100644 --- a/tasks/repository.yml +++ b/tasks/repository.yml @@ -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 diff --git a/tests/test.yml b/tests/test.yml index 68f8b6b..5d6e714 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -3,7 +3,7 @@ - hosts: localhost remote_user: root roles: - - ansible-r + - ../../ vars: r_install: - littler diff --git a/tests/vagrant.yml b/tests/vagrant.yml index 1f43d46..5901ac9 100644 --- a/tests/vagrant.yml +++ b/tests/vagrant.yml @@ -4,4 +4,4 @@ remote_user: vagrant sudo: true roles: - - r + - ../../