Skip to content

Commit

Permalink
Unbreak CI again (PowerDNS#100)
Browse files Browse the repository at this point in the history
* fixing all broken things at once

* adding blank line
  • Loading branch information
npmdnl committed Jul 10, 2023
1 parent b848869 commit 9091d13
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: checkout
uses: actions/checkout@v3
- name: Install python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ __pycache__/
.cache
.molecule
.vagrant
venv/

2 changes: 1 addition & 1 deletion handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- name: Reload systemd and restart dnsdist
ansible.builtin.systemd:
daemon_reload: true
notify: restart dnsdist
notify: Restart dnsdist
when: not dnsdist_disable_handlers

- name: Restart dnsdist
Expand Down
2 changes: 1 addition & 1 deletion molecule/dnsdist-18/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ platforms:

- name: ubuntu-2004
image: ubuntu:20.04
dockerfile_tpl: debian-systemd
dockerfile_tpl: ubuntu-systemd

- name: debian-10
image: debian:10
Expand Down
25 changes: 25 additions & 0 deletions molecule/resources/Dockerfile.ubuntu-systemd.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Molecule managed

FROM {{ item.image }}

RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get upgrade -y && apt-get install -y systemd && apt-get clean; fi
RUN if [ ! -e /sbin/init ]; then ln -s /lib/systemd/systemd /sbin/init ; fi

ENV container docker

# Don't start the optional systemd services.
RUN find /etc/systemd/system \
/lib/systemd/system \
-path '*.wants/*' \
-not -name '*journald*' \
-not -name '*systemd-tmpfiles*' \
-not -name '*systemd-user-sessions*' \
-exec rm \{} \;

RUN systemctl set-default multi-user.target

VOLUME [ "/sys/fs/cgroup" ]

CMD ["/sbin/init"]

RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get upgrade -y && apt-get install -y python3 sudo bash net-tools ca-certificates && apt-get clean; fi
4 changes: 4 additions & 0 deletions requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
collections:
- name: community.docker
- name: ansible.posix
10 changes: 6 additions & 4 deletions tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
group: root
mode: 0644
when: dnsdist_service_overrides != {}
notify: reload systemd and restart dnsdist
notify: Reload systemd and restart dnsdist

- name: Override the dnsdist unit (systemd)
ansible.builtin.template:
Expand All @@ -29,7 +29,7 @@
group: root
mode: 0644
when: dnsdist_unit_overrides != {}
notify: reload systemd and restart dnsdist
notify: Reload systemd and restart dnsdist

- name: Override the dnsdist environments (systemd)
ansible.builtin.template:
Expand All @@ -39,14 +39,16 @@
group: root
mode: 0644
when: dnsdist_environment_overrides != {}
notify: reload systemd and restart dnsdist
notify: Reload systemd and restart dnsdist

- name: Add the dnsdist configuration
tags:
- molecule-idempotence-notest
ansible.builtin.template:
src: dnsdist.conf.j2
dest: "{{ default_dnsdist_config_location }}"
owner: "{{ _dnsdist_owner }}"
group: "{{ _dnsdist_group }}"
mode: 0640
validate: dnsdist -C %s --check-config 2>&1
notify: restart dnsdist
notify: Restart dnsdist
1 change: 1 addition & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
tags:
- install
- configure
- molecule-idempotence-notest
block:
- name: Check if the key is already present in the DNSdist configuration file
ansible.builtin.shell: |
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ ANSIBLE=
passenv = *
deps =
-rtest-requirements.txt
ansible212: ansible-core<2.13
ansible213: ansible-core<2.14
ansible214: ansible-core<2.15
ansible212: ansible-core>2.12,<2.13
ansible213: ansible-core>2.13,<2.14
ansible214: ansible-core>2.14,<2.15
setenv =
PY_COLORS = 1
commands =
Expand Down

0 comments on commit 9091d13

Please sign in to comment.