diff options
-rw-r--r-- | .yamllint.yml | 58 | ||||
-rwxr-xr-x | setup_travis_tests.sh | 18 | ||||
-rw-r--r-- | tests/.ansible-lint | 2 | ||||
-rw-r--r-- | tests/Dockerfile.centos-7 | 27 | ||||
-rw-r--r-- | tests/Dockerfile.debian-jessie | 14 | ||||
-rw-r--r-- | tests/Dockerfile.debian-stretch | 13 | ||||
-rw-r--r-- | tests/Dockerfile.fedora-24 | 26 | ||||
-rw-r--r-- | tests/Dockerfile.fedora-25 | 26 | ||||
-rw-r--r-- | tests/Dockerfile.fedora-26 | 26 | ||||
-rw-r--r-- | tests/Dockerfile.fedora-27 | 26 | ||||
-rw-r--r-- | tests/Dockerfile.fedora-28 | 26 | ||||
-rw-r--r-- | tests/Dockerfile.fedora-29 | 26 | ||||
-rw-r--r-- | tests/Dockerfile.ubuntu-bionic | 13 | ||||
-rw-r--r-- | tests/Dockerfile.ubuntu-trusty | 14 | ||||
-rw-r--r-- | tests/Dockerfile.ubuntu-xenial | 13 |
15 files changed, 328 insertions, 0 deletions
diff --git a/.yamllint.yml b/.yamllint.yml new file mode 100644 index 0000000..9c7cac4 --- /dev/null +++ b/.yamllint.yml | |||
@@ -0,0 +1,58 @@ | |||
1 | --- | ||
2 | extends: default | ||
3 | |||
4 | rules: | ||
5 | braces: | ||
6 | # Defaults | ||
7 | # min-spaces-inside: 0 | ||
8 | # max-spaces-inside: 0 | ||
9 | |||
10 | # Keeping 0 min-spaces to not error on empty collection definitions | ||
11 | min-spaces-inside: 0 | ||
12 | # Allowing one space inside braces to improve code readability | ||
13 | max-spaces-inside: 1 | ||
14 | |||
15 | brackets: | ||
16 | # Defaults | ||
17 | # min-spaces-inside: 0 | ||
18 | # max-spaces-inside: 0 | ||
19 | |||
20 | # Keeping 0 min-spaces to not error on empty collection definitions | ||
21 | min-spaces-inside: 0 | ||
22 | # Allowing one space inside braces to improve code readability | ||
23 | max-spaces-inside: 1 | ||
24 | |||
25 | colons: | ||
26 | # Defaults | ||
27 | # max-spaces-before: 0 | ||
28 | # max-spaces-after: 1 | ||
29 | |||
30 | max-spaces-before: 0 | ||
31 | # Allowing more than one space for code readability | ||
32 | max-spaces-after: -1 | ||
33 | |||
34 | comments: | ||
35 | # Defaults | ||
36 | # level: warning | ||
37 | # require-starting-space: true | ||
38 | # min-spaces-from-content: 2 | ||
39 | |||
40 | # Disabling to allow for code comment blocks and #!/usr/bin/ansible-playbook | ||
41 | require-starting-space: false | ||
42 | |||
43 | indentation: | ||
44 | # Defaults | ||
45 | # spaces: consistent | ||
46 | # indent-sequences: true | ||
47 | # check-multi-line-strings: false | ||
48 | |||
49 | # Requiring 2 space indentation | ||
50 | spaces: 2 | ||
51 | # Requiring consistent indentation within a file, either indented or not | ||
52 | indent-sequences: consistent | ||
53 | |||
54 | # Disabling due to copious amounts of long lines in the code which would | ||
55 | # require a code style change to resolve | ||
56 | line-length: disable | ||
57 | |||
58 | truthy: disable | ||
diff --git a/setup_travis_tests.sh b/setup_travis_tests.sh new file mode 100755 index 0000000..302e659 --- /dev/null +++ b/setup_travis_tests.sh | |||
@@ -0,0 +1,18 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | TRAVIS_TEST_VER="v1.6.2" | ||
3 | |||
4 | TAR_FILE="$TRAVIS_TEST_VER.tar.gz" | ||
5 | |||
6 | # Prompt for Ansible role name | ||
7 | read -r -p "Enter the Ansible role name: " input | ||
8 | |||
9 | # Update .travis.yml with Ansible role name | ||
10 | sed -i '' "s/replace_role/${input}/g" ".travis.yml" | ||
11 | |||
12 | # Update tests/test.yml with Ansible role name | ||
13 | sed -i '' "s/replace_role/${input}/g" "tests/test.yml" | ||
14 | |||
15 | # Cleanup | ||
16 | if [ -f $TAR_FILE ]; then | ||
17 | rm $TAR_FILE | ||
18 | fi | ||
diff --git a/tests/.ansible-lint b/tests/.ansible-lint new file mode 100644 index 0000000..7dfbb8f --- /dev/null +++ b/tests/.ansible-lint | |||
@@ -0,0 +1,2 @@ | |||
1 | skip_list: | ||
2 | - "503" | ||
diff --git a/tests/Dockerfile.centos-7 b/tests/Dockerfile.centos-7 new file mode 100644 index 0000000..1ad757e --- /dev/null +++ b/tests/Dockerfile.centos-7 | |||
@@ -0,0 +1,27 @@ | |||
1 | FROM centos:7 | ||
2 | ENV container=docker | ||
3 | |||
4 | RUN yum -y install epel-release && \ | ||
5 | yum -y install gmp-devel libffi-devel openssl-devel python-crypto \ | ||
6 | python-devel python-pip python-setuptools python-virtualenv \ | ||
7 | redhat-rpm-config && \ | ||
8 | yum -y group install "Development Tools" | ||
9 | |||
10 | # Install systemd -- See https://hub.docker.com/_/centos/ | ||
11 | RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ | ||
12 | rm -f /lib/systemd/system/multi-user.target.wants/*;\ | ||
13 | rm -f /etc/systemd/system/*.wants/*;\ | ||
14 | rm -f /lib/systemd/system/local-fs.target.wants/*; \ | ||
15 | rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ | ||
16 | rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ | ||
17 | rm -f /lib/systemd/system/basic.target.wants/*;\ | ||
18 | rm -f /lib/systemd/system/anaconda.target.wants/*; | ||
19 | |||
20 | RUN pip install enum34 ipaddress wheel && \ | ||
21 | pip install ansible ansible-lint | ||
22 | |||
23 | COPY .ansible-lint / | ||
24 | |||
25 | VOLUME ["/sys/fs/cgroup"] | ||
26 | |||
27 | CMD ["/usr/sbin/init"] | ||
diff --git a/tests/Dockerfile.debian-jessie b/tests/Dockerfile.debian-jessie new file mode 100644 index 0000000..2bb5bc2 --- /dev/null +++ b/tests/Dockerfile.debian-jessie | |||
@@ -0,0 +1,14 @@ | |||
1 | FROM debian:jessie | ||
2 | ENV container=docker | ||
3 | |||
4 | RUN apt-get update && \ | ||
5 | apt-get install -y --no-install-recommends build-essential libffi-dev \ | ||
6 | libssl-dev python-dev python-minimal python-pip python-setuptools \ | ||
7 | python-virtualenv && \ | ||
8 | rm -rf /var/lib/apt/lists/* | ||
9 | |||
10 | RUN pip install --upgrade pip setuptools && \ | ||
11 | pip install enum34 ipaddress wheel && \ | ||
12 | pip install ansible ansible-lint | ||
13 | |||
14 | COPY .ansible-lint / | ||
diff --git a/tests/Dockerfile.debian-stretch b/tests/Dockerfile.debian-stretch new file mode 100644 index 0000000..c1187b8 --- /dev/null +++ b/tests/Dockerfile.debian-stretch | |||
@@ -0,0 +1,13 @@ | |||
1 | FROM debian:stretch | ||
2 | ENV container=docker | ||
3 | |||
4 | RUN apt-get update && \ | ||
5 | apt-get install -y --no-install-recommends build-essential libffi-dev \ | ||
6 | libssl-dev python-dev python-minimal python-pip python-setuptools \ | ||
7 | python-virtualenv systemd && \ | ||
8 | rm -rf /var/lib/apt/lists/* | ||
9 | |||
10 | RUN pip install enum34 ipaddress wheel && \ | ||
11 | pip install ansible ansible-lint | ||
12 | |||
13 | COPY .ansible-lint / | ||
diff --git a/tests/Dockerfile.fedora-24 b/tests/Dockerfile.fedora-24 new file mode 100644 index 0000000..b2a83cc --- /dev/null +++ b/tests/Dockerfile.fedora-24 | |||
@@ -0,0 +1,26 @@ | |||
1 | FROM fedora:24 | ||
2 | ENV container=docker | ||
3 | |||
4 | RUN dnf -y install gmp-devel libffi-devel openssl-devel python-crypto \ | ||
5 | python-devel python-dnf python-pip python-setuptools python-virtualenv \ | ||
6 | redhat-rpm-config systemd && \ | ||
7 | dnf -y group install "C Development Tools and Libraries" | ||
8 | |||
9 | # Install systemd -- See https://hub.docker.com/_/centos/ | ||
10 | RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ | ||
11 | rm -f /lib/systemd/system/multi-user.target.wants/*;\ | ||
12 | rm -f /etc/systemd/system/*.wants/*;\ | ||
13 | rm -f /lib/systemd/system/local-fs.target.wants/*; \ | ||
14 | rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ | ||
15 | rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ | ||
16 | rm -f /lib/systemd/system/basic.target.wants/*;\ | ||
17 | rm -f /lib/systemd/system/anaconda.target.wants/*; | ||
18 | |||
19 | RUN pip install enum34 ipaddress wheel && \ | ||
20 | pip install ansible ansible-lint | ||
21 | |||
22 | COPY .ansible-lint / | ||
23 | |||
24 | VOLUME ["/sys/fs/cgroup"] | ||
25 | |||
26 | CMD ["/usr/sbin/init"] | ||
diff --git a/tests/Dockerfile.fedora-25 b/tests/Dockerfile.fedora-25 new file mode 100644 index 0000000..16fa871 --- /dev/null +++ b/tests/Dockerfile.fedora-25 | |||
@@ -0,0 +1,26 @@ | |||
1 | FROM fedora:25 | ||
2 | ENV container=docker | ||
3 | |||
4 | RUN dnf -y install gmp-devel libffi-devel openssl-devel python-crypto \ | ||
5 | python-devel python-dnf python-pip python-setuptools python-virtualenv \ | ||
6 | redhat-rpm-config systemd && \ | ||
7 | dnf -y group install "C Development Tools and Libraries" | ||
8 | |||
9 | # Install systemd -- See https://hub.docker.com/_/centos/ | ||
10 | RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ | ||
11 | rm -f /lib/systemd/system/multi-user.target.wants/*;\ | ||
12 | rm -f /etc/systemd/system/*.wants/*;\ | ||
13 | rm -f /lib/systemd/system/local-fs.target.wants/*; \ | ||
14 | rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ | ||
15 | rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ | ||
16 | rm -f /lib/systemd/system/basic.target.wants/*;\ | ||
17 | rm -f /lib/systemd/system/anaconda.target.wants/*; | ||
18 | |||
19 | RUN pip install enum34 ipaddress wheel && \ | ||
20 | pip install ansible ansible-lint | ||
21 | |||
22 | COPY .ansible-lint / | ||
23 | |||
24 | VOLUME ["/sys/fs/cgroup"] | ||
25 | |||
26 | CMD ["/usr/sbin/init"] | ||
diff --git a/tests/Dockerfile.fedora-26 b/tests/Dockerfile.fedora-26 new file mode 100644 index 0000000..dd8a954 --- /dev/null +++ b/tests/Dockerfile.fedora-26 | |||
@@ -0,0 +1,26 @@ | |||
1 | FROM fedora:26 | ||
2 | ENV container=docker | ||
3 | |||
4 | RUN dnf -y install gmp-devel libffi-devel openssl-devel python-crypto \ | ||
5 | python-devel python-dnf python-pip python-setuptools python-virtualenv \ | ||
6 | redhat-rpm-config systemd && \ | ||
7 | dnf -y group install "C Development Tools and Libraries" | ||
8 | |||
9 | # Install systemd -- See https://hub.docker.com/_/centos/ | ||
10 | RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ | ||
11 | rm -f /lib/systemd/system/multi-user.target.wants/*;\ | ||
12 | rm -f /etc/systemd/system/*.wants/*;\ | ||
13 | rm -f /lib/systemd/system/local-fs.target.wants/*; \ | ||
14 | rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ | ||
15 | rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ | ||
16 | rm -f /lib/systemd/system/basic.target.wants/*;\ | ||
17 | rm -f /lib/systemd/system/anaconda.target.wants/*; | ||
18 | |||
19 | RUN pip install enum34 ipaddress wheel && \ | ||
20 | pip install ansible ansible-lint | ||
21 | |||
22 | COPY .ansible-lint / | ||
23 | |||
24 | VOLUME ["/sys/fs/cgroup"] | ||
25 | |||
26 | CMD ["/usr/sbin/init"] | ||
diff --git a/tests/Dockerfile.fedora-27 b/tests/Dockerfile.fedora-27 new file mode 100644 index 0000000..15474da --- /dev/null +++ b/tests/Dockerfile.fedora-27 | |||
@@ -0,0 +1,26 @@ | |||
1 | FROM fedora:27 | ||
2 | ENV container=docker | ||
3 | |||
4 | RUN dnf -y install gmp-devel libffi-devel openssl-devel python-crypto \ | ||
5 | python-devel python-dnf python-pip python-setuptools python-virtualenv \ | ||
6 | redhat-rpm-config systemd && \ | ||
7 | dnf -y group install "C Development Tools and Libraries" | ||
8 | |||
9 | # Install systemd -- See https://hub.docker.com/_/centos/ | ||
10 | RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ | ||
11 | rm -f /lib/systemd/system/multi-user.target.wants/*;\ | ||
12 | rm -f /etc/systemd/system/*.wants/*;\ | ||
13 | rm -f /lib/systemd/system/local-fs.target.wants/*; \ | ||
14 | rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ | ||
15 | rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ | ||
16 | rm -f /lib/systemd/system/basic.target.wants/*;\ | ||
17 | rm -f /lib/systemd/system/anaconda.target.wants/*; | ||
18 | |||
19 | RUN pip install enum34 ipaddress wheel && \ | ||
20 | pip install ansible ansible-lint | ||
21 | |||
22 | COPY .ansible-lint / | ||
23 | |||
24 | VOLUME ["/sys/fs/cgroup"] | ||
25 | |||
26 | CMD ["/usr/sbin/init"] | ||
diff --git a/tests/Dockerfile.fedora-28 b/tests/Dockerfile.fedora-28 new file mode 100644 index 0000000..1885bc7 --- /dev/null +++ b/tests/Dockerfile.fedora-28 | |||
@@ -0,0 +1,26 @@ | |||
1 | FROM fedora:28 | ||
2 | ENV container=docker | ||
3 | |||
4 | RUN dnf -y install gmp-devel libffi-devel openssl-devel python-crypto \ | ||
5 | python-devel python-dnf python-pip python-setuptools python-virtualenv \ | ||
6 | redhat-rpm-config systemd && \ | ||
7 | dnf -y group install "C Development Tools and Libraries" | ||
8 | |||
9 | # Install systemd -- See https://hub.docker.com/_/centos/ | ||
10 | RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ | ||
11 | rm -f /lib/systemd/system/multi-user.target.wants/*;\ | ||
12 | rm -f /etc/systemd/system/*.wants/*;\ | ||
13 | rm -f /lib/systemd/system/local-fs.target.wants/*; \ | ||
14 | rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ | ||
15 | rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ | ||
16 | rm -f /lib/systemd/system/basic.target.wants/*;\ | ||
17 | rm -f /lib/systemd/system/anaconda.target.wants/*; | ||
18 | |||
19 | RUN pip install enum34 ipaddress wheel && \ | ||
20 | pip install ansible ansible-lint | ||
21 | |||
22 | COPY .ansible-lint / | ||
23 | |||
24 | VOLUME ["/sys/fs/cgroup"] | ||
25 | |||
26 | CMD ["/usr/sbin/init"] | ||
diff --git a/tests/Dockerfile.fedora-29 b/tests/Dockerfile.fedora-29 new file mode 100644 index 0000000..3f94b36 --- /dev/null +++ b/tests/Dockerfile.fedora-29 | |||
@@ -0,0 +1,26 @@ | |||
1 | FROM fedora:29 | ||
2 | ENV container=docker | ||
3 | |||
4 | RUN dnf -y install gmp-devel libffi-devel openssl-devel python-crypto \ | ||
5 | python-devel python-dnf python-pip python-setuptools python-virtualenv \ | ||
6 | redhat-rpm-config systemd && \ | ||
7 | dnf -y group install "C Development Tools and Libraries" | ||
8 | |||
9 | # Install systemd -- See https://hub.docker.com/_/centos/ | ||
10 | RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ | ||
11 | rm -f /lib/systemd/system/multi-user.target.wants/*;\ | ||
12 | rm -f /etc/systemd/system/*.wants/*;\ | ||
13 | rm -f /lib/systemd/system/local-fs.target.wants/*; \ | ||
14 | rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ | ||
15 | rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ | ||
16 | rm -f /lib/systemd/system/basic.target.wants/*;\ | ||
17 | rm -f /lib/systemd/system/anaconda.target.wants/*; | ||
18 | |||
19 | RUN pip install enum34 ipaddress wheel && \ | ||
20 | pip install ansible ansible-lint | ||
21 | |||
22 | COPY .ansible-lint / | ||
23 | |||
24 | VOLUME ["/sys/fs/cgroup"] | ||
25 | |||
26 | CMD ["/usr/sbin/init"] | ||
diff --git a/tests/Dockerfile.ubuntu-bionic b/tests/Dockerfile.ubuntu-bionic new file mode 100644 index 0000000..07116b6 --- /dev/null +++ b/tests/Dockerfile.ubuntu-bionic | |||
@@ -0,0 +1,13 @@ | |||
1 | FROM ubuntu:bionic | ||
2 | ENV container=docker | ||
3 | |||
4 | RUN apt-get update && \ | ||
5 | apt-get install -y --no-install-recommends build-essential libffi-dev \ | ||
6 | libssl-dev python-dev python-minimal python-pip python-setuptools \ | ||
7 | python-virtualenv systemd && \ | ||
8 | rm -rf /var/lib/apt/lists/* | ||
9 | |||
10 | RUN pip install enum34 ipaddress wheel && \ | ||
11 | pip install ansible ansible-lint | ||
12 | |||
13 | COPY .ansible-lint / | ||
diff --git a/tests/Dockerfile.ubuntu-trusty b/tests/Dockerfile.ubuntu-trusty new file mode 100644 index 0000000..b1645da --- /dev/null +++ b/tests/Dockerfile.ubuntu-trusty | |||
@@ -0,0 +1,14 @@ | |||
1 | FROM ubuntu:trusty | ||
2 | ENV container=docker | ||
3 | |||
4 | RUN apt-get update && \ | ||
5 | apt-get install -y --no-install-recommends build-essential libffi-dev \ | ||
6 | libssl-dev python-dev python-minimal python-pip python-setuptools \ | ||
7 | python-virtualenv && \ | ||
8 | rm -rf /var/lib/apt/lists/* | ||
9 | |||
10 | RUN pip install --upgrade pip setuptools && \ | ||
11 | pip install enum34 ipaddress wheel && \ | ||
12 | pip install ansible ansible-lint | ||
13 | |||
14 | COPY .ansible-lint / | ||
diff --git a/tests/Dockerfile.ubuntu-xenial b/tests/Dockerfile.ubuntu-xenial new file mode 100644 index 0000000..188f255 --- /dev/null +++ b/tests/Dockerfile.ubuntu-xenial | |||
@@ -0,0 +1,13 @@ | |||
1 | FROM ubuntu:xenial | ||
2 | ENV container=docker | ||
3 | |||
4 | RUN apt-get update && \ | ||
5 | apt-get install -y --no-install-recommends build-essential libffi-dev \ | ||
6 | libssl-dev python-dev python-minimal python-pip python-setuptools \ | ||
7 | python-virtualenv && \ | ||
8 | rm -rf /var/lib/apt/lists/* | ||
9 | |||
10 | RUN pip install enum34 ipaddress wheel && \ | ||
11 | pip install ansible ansible-lint | ||
12 | |||
13 | COPY .ansible-lint / | ||