-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from pieterlexis/os-repos-tests
Fix #84 and add tests for os-repos
- Loading branch information
Showing
20 changed files
with
172 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,4 +88,5 @@ verifier: | |
- ../repo-42/ | ||
- ../backend-sqlite/ | ||
- ../backend-mysql/ | ||
- ../systemd-override/ | ||
lint: flake8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,4 +88,5 @@ verifier: | |
- ../repo-43/ | ||
- ../backend-sqlite/ | ||
- ../backend-mysql/ | ||
- ../systemd-override/ | ||
lint: flake8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,4 +85,5 @@ verifier: | |
- ../repo-master/ | ||
- ../backend-sqlite/ | ||
- ../backend-mysql/ | ||
- ../systemd-override/ | ||
lint: flake8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
|
||
ansible_python_interpreter: "/usr/bin/python3" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
|
||
ansible_python_interpreter: "/usr/bin/python3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
molecule/resources/tests/systemd-no-override/test_override.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
def test_systemd_override(host): | ||
smgr = host.ansible("setup")["ansible_facts"]["ansible_service_mgr"] | ||
if smgr == 'systemd': | ||
fname = '/etc/systemd/system/pdns.service.d/override.conf' | ||
f = host.file(fname) | ||
|
||
assert not f.exists |
10 changes: 10 additions & 0 deletions
10
molecule/resources/tests/systemd-override/test_override.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
def test_systemd_override(host): | ||
smgr = host.ansible("setup")["ansible_facts"]["ansible_service_mgr"] | ||
if smgr == 'systemd': | ||
fname = '/etc/systemd/system/pdns.service.d/override.conf' | ||
f = host.file(fname) | ||
|
||
assert f.exists | ||
assert f.user == 'root' | ||
assert f.group == 'root' | ||
assert f.contains('LimitCORE=infinity') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
|
||
## | ||
# PowerDNS Configuration | ||
## | ||
|
||
pdns_config: | ||
|
||
# Turns on master operations | ||
master: true | ||
|
||
# Listen Address | ||
local-address: "127.0.0.1" | ||
local-port: "53" | ||
|
||
# API Configuration | ||
api: yes | ||
api-key: "powerdns" | ||
|
||
# Embedded webserver | ||
webserver: yes | ||
webserver-address: "0.0.0.0" | ||
webserver-port: "8001" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
|
||
- hosts: pdns | ||
vars_files: | ||
- ../resources/vars/pdns-no-overrides.yml | ||
roles: | ||
- { role: pdns-ansible } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
|
||
scenario: | ||
name: systemd-no-overrides | ||
|
||
driver: | ||
name: docker | ||
|
||
dependency: | ||
name: galaxy | ||
|
||
platforms: | ||
- name: debian-10 | ||
groups: ["pdns"] | ||
image: debian:10 | ||
dockerfile_tpl: debian-systemd | ||
|
||
- name: ubuntu-2004 | ||
groups: ["pdns"] | ||
image: ubuntu:20.04 | ||
dockerfile_tpl: debian-systemd | ||
|
||
provisioner: | ||
name: ansible | ||
options: | ||
diff: True | ||
v: True | ||
config_options: | ||
defaults: | ||
gathering: smart | ||
fact_caching: jsonfile | ||
fact_caching_connection: .ansible_cache | ||
fact_caching_timeout: 7200 | ||
ssh_connection: | ||
pipelining: true | ||
inventory: | ||
links: | ||
host_vars: ../resources/host_vars/ | ||
playbooks: | ||
create: ../resources/create.yml | ||
destroy: ../resources/destroy.yml | ||
prepare: ../resources/prepare.yml | ||
lint: ansible-lint -x ANSIBLE0006 ANSIBLE0016 306 | ||
|
||
lint: yamllint defaults tasks meta vars | ||
|
||
verifier: | ||
name: testinfra | ||
options: | ||
hosts: "pdns" | ||
vvv: True | ||
directory: ../resources/tests/all | ||
additional_files_or_dirs: | ||
# path relative to 'directory' | ||
- ../no-systemd-overrides | ||
lint: flake8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
|
||
# The name of the PowerDNS Authoritative Server package | ||
default_pdns_package_name: "pdns-server" | ||
|
||
# The name of the PowerDNS Authoritative Server debug package | ||
default_pdns_debug_symbols_package_name: "pdns-server-dbg" | ||
|
||
# Packages needed to install MySQL | ||
pdns_mysql_packages: | ||
- default-mysql-client | ||
- python3-pymysql | ||
|
||
# List of PowerDNS Authoritative Server Backends packages on Debian | ||
default_pdns_backends_packages: | ||
geo: pdns-backend-geo | ||
geoip: pdns-backend-geoip | ||
gmysql: pdns-backend-mysql | ||
gpgsql: pdns-backend-pgsql | ||
gsqlite3: pdns-backend-sqlite3 | ||
ldap: pdns-backend-ldap | ||
lmdb: pdns-backend-lmdb | ||
lua: pdns-backend-lua | ||
mydns: pdns-backend-mydns | ||
pipe: pdns-backend-pipe | ||
remote: pdns-backend-remote | ||
tinydns: pdns-backend-tinydns | ||
|
||
# The directory where the PowerDNS Authoritative Server configuration is located | ||
default_pdns_config_dir: "/etc/powerdns" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters