diff --git a/.travis.yml b/.travis.yml index aad4d5d..d8b34af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,10 @@ python: "2.7" env: - ANSIBLE_VERSION=latest + - ANSIBLE_VERSION=2.7.2 - ANSIBLE_VERSION=2.7.1 - ANSIBLE_VERSION=2.7.0 + - ANSIBLE_VERSION=2.6.8 - ANSIBLE_VERSION=2.6.7 - ANSIBLE_VERSION=2.6.6 - ANSIBLE_VERSION=2.6.5 @@ -56,7 +58,7 @@ script: && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1) - - if [ "$ANSIBLE_VERSION" = "latest" ]; then ansible-lint tests/test.yml || true; fi + - if [ "$ANSIBLE_VERSION" = "latest" ]; then ansible-lint tests/test.yml; fi notifications: email: false diff --git a/Vagrantfile b/Vagrantfile index 0697955..64d2358 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -3,6 +3,7 @@ role = File.basename(File.expand_path(File.dirname(__FILE__))) + boxes = [ { :name => "ubuntu-1204", @@ -25,24 +26,31 @@ boxes = [ :cpu => "50", :ram => "256" }, + { + :name => "ubuntu-1804", + :box => "bento/ubuntu-18.04", + :ip => '10.0.0.14', + :cpu => "50", + :ram => "256" + }, { :name => "debian-7", :box => "bento/debian-7", - :ip => '10.0.0.14', + :ip => '10.0.0.15', :cpu => "50", :ram => "256" }, { :name => "debian-8", :box => "bento/debian-8", - :ip => '10.0.0.15', + :ip => '10.0.0.16', :cpu => "50", :ram => "256" }, { :name => "debian-9", :box => "bento/debian-9", - :ip => '10.0.0.16', + :ip => '10.0.0.17', :cpu => "50", :ram => "256" }, diff --git a/meta/main.yml b/meta/main.yml index 531b413..6b3b069 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,6 +1,7 @@ # meta file for sudoers --- galaxy_info: + role_name: sudoers author: Mischa ter Smitten company: Oefenweb.nl B.V. description: Manage sudoers and sudoers.d in Debian-like systems @@ -12,6 +13,7 @@ galaxy_info: - precise - trusty - xenial + - bionic - name: Debian versions: - wheezy diff --git a/tasks/main.yml b/tasks/main.yml index 3ad4c37..74e494d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -13,11 +13,10 @@ - name: install apt: - name: "{{ item }}" + name: "{{ sudoers_dependencies }}" state: "{{ apt_install_state | default('latest') }}" update_cache: true cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}" - with_items: "{{ sudoers_dependencies }}" tags: - configuration - sudoers diff --git a/vars/_bionic.yml b/vars/_bionic.yml new file mode 100644 index 0000000..ec7e88f --- /dev/null +++ b/vars/_bionic.yml @@ -0,0 +1,14 @@ +# vars file for sudoers +--- +sudoers_sudoers_preset_defaults: + - env_reset + - 'exempt_group=sudo' + - mail_badpass + - 'secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"' +sudoers_sudoers_preset_privileges: + - name: root + entry: 'ALL=(ALL:ALL) ALL' + - name: '%admin' + entry: 'ALL=(ALL) ALL' + - name: '%sudo' + entry: 'ALL=(ALL:ALL) ALL'