Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lint errors and update molecule for ansible v2.8 #23

3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ services:
before_install:
- sudo apt-get -qq update
install:
- pip install molecule
# molecule version >v2.22 required for compatibility with ansible 2.8.x (provided in the used docker image)
- pip install molecule==2.22
- pip install docker
script:
- molecule test
Expand Down
5 changes: 3 additions & 2 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
---
galaxy_info:
author: "Matthias Baumann & Jan Hentschel"
description: "Role to install kerberos server(s)"
company: Ultra Tendency GmbH
license: BSD 3-Clause
min_ansible_version: 1.4
platforms:
- name: EL
versions:
- 7
categories:
galaxy_tags:
- kerberos
- kdc
dependencies: []
dependencies: [ ]
2 changes: 1 addition & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ lint:
platforms:
- name: centos-7
image: fiercely/centos7:systemd
privileged: True
privileged: true
volume_mounts:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
command: "/usr/sbin/init"
Expand Down
6 changes: 3 additions & 3 deletions molecule/default/tests/test_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_kdc_conf(host):
assert kdc_conf.is_file
assert kdc_conf.user == 'root'
assert kdc_conf.group == 'root'
assert oct(kdc_conf.mode) == '0600'
assert kdc_conf.mode == 0o600


@pytest.mark.parametrize('content', [
Expand All @@ -50,7 +50,7 @@ def test_kadm5_acl(host):
assert kadm5_acl.is_file
assert kadm5_acl.user == 'root'
assert kadm5_acl.group == 'root'
assert oct(kadm5_acl.mode) == '0600'
assert kadm5_acl.mode == 0o600


@pytest.mark.parametrize('content', [
Expand All @@ -70,7 +70,7 @@ def test_krb5_conf(host):
assert krb5_conf.is_file
assert krb5_conf.user == 'root'
assert krb5_conf.group == 'root'
assert oct(krb5_conf.mode) == '0644'
assert krb5_conf.mode == 0o644


@pytest.mark.parametrize('content', [
Expand Down
5 changes: 3 additions & 2 deletions tasks/redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

- name: Install the kerberos packages
yum:
name: "{{ item }}"
name: "{{ kerberos_server_redhat_pkg }}"
state: present
with_items: "{{ kerberos_server_redhat_pkg }}"

- name: Copy the KDC configuration file
template:
Expand All @@ -29,6 +28,7 @@

- name: Create the initial Kerberos database
shell: >
set -o pipefail;
echo -e "{{ kerberos_server_master_db_pass }}\n{{ kerberos_server_master_db_pass }}" | kdb5_util create -s;
touch /var/kerberos/db_created creates=/var/kerberos/db_created

Expand All @@ -41,6 +41,7 @@

- name: Create an admin user for administering the Kerberos database
shell: >
set -o pipefail;
echo -e "{{ kerberos_server_kadmin_pass }}\n{{ kerberos_server_kadmin_pass }}" |
kadmin.local -q "addprinc {{ kerberos_server_kadmin_user }}/admin";
touch /var/kerberos/admin_created creates=/var/kerberos/admin_created
Expand Down