From e53f97b0b5f24d04b2e919cc6a84d3ca74afad6b Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Thu, 27 Aug 2015 10:53:57 +0200 Subject: [PATCH] Added support for Debian (8.1) --- .travis.yml | 3 --- Vagrantfile | 10 ++++++++-- meta/main.yml | 8 ++++++-- tasks/main.yml | 8 +++----- tests/test.yml | 2 +- tests/vagrant.yml | 2 +- 6 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5f490aa..c238ce5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,9 +38,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 6f3bb31..5989580 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-1004", @@ -46,6 +44,14 @@ boxes = [ :cpu => "50", :ram => "256" }, + { + :name => "debian-81", + :box => "opscode-debian-8.1", + :url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-8.1_chef-provisionerless.box", + :ip => '10.0.0.15', + :cpu => "50", + :ram => "256" + }, ] Vagrant.configure("2") do |config| diff --git a/meta/main.yml b/meta/main.yml index 19dfccb..9699753 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -9,10 +9,14 @@ galaxy_info: platforms: - name: Ubuntu versions: - - all + - lucid + - precise + - trusty - name: Debian versions: - - all + - squeeze + - wheezy + - jessie categories: - system dependencies: [] diff --git a/tasks/main.yml b/tasks/main.yml index 0907afe..74222da 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -13,7 +13,7 @@ name: "{{ item }}" state: latest with_items: locales_language_packs_present - when: locales_language_packs_present + when: ansible_distribution == 'Ubuntu' notify: update locales tags: [configuration, locales, locales-language-packs-present] @@ -22,7 +22,7 @@ name: "{{ item }}" state: absent with_items: locales_language_packs_absent - when: locales_language_packs_absent + when: ansible_distribution == 'Ubuntu' notify: update locales tags: [configuration, locales, locales-language-packs-absent] @@ -36,7 +36,7 @@ file: path: "{{ locales_gen_file }}" state: touch - when: not locales_gen_file_stats.stat.exists + when: locales_gen_file_stats.stat.exists == false tags: [configuration, locales, locales-gen-file] - name: make sure (specified) locales are present @@ -44,7 +44,6 @@ name: "{{ item }}" state: present with_items: locales_present - when: locales_present tags: [configuration, locales, locales-present] - name: make sure (specified) locales are absent @@ -52,7 +51,6 @@ name: "{{ item }}" state: absent with_items: locales_absent - when: locales_absent tags: [configuration, locales, locales-absent] - name: set default locale diff --git a/tests/test.yml b/tests/test.yml index d282d0d..769cb7f 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -3,4 +3,4 @@ - hosts: localhost remote_user: root roles: - - ansible-locales + - ../../ diff --git a/tests/vagrant.yml b/tests/vagrant.yml index 6a7fe80..095cd3f 100644 --- a/tests/vagrant.yml +++ b/tests/vagrant.yml @@ -4,4 +4,4 @@ remote_user: vagrant sudo: true roles: - - locales + - ../../