Skip to content

Commit

Permalink
logging update and use ansible dense output
Browse files Browse the repository at this point in the history
  • Loading branch information
lightlike committed Jun 21, 2024
1 parent 36b8ce3 commit a970bbc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ RUN apk add --no-cache \

RUN pip install --no-cache --break-system-packages nc-dnsapi

ENV ANSIBLE_STDOUT_CALLBACK=unixy
# Ansible specific variables
ENV ANSIBLE_STDOUT_CALLBACK=dense
ENV ANSIBLE_LOAD_CALLBACK_PLUGINS=1
ENV ANSIBLE_LOCALHOST_WARNING=False
ENV ANSIBLE_INVENTORY_UNPARSED_WARNING=False

# DynDNS Variables
ENV RECORDS="* @"
ENV SCHEDULE="*/10 * * * *"

Expand Down
3 changes: 2 additions & 1 deletion ansible/update-dns.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
- hosts: 127.0.0.1
- hosts: localhost
connection: local
gather_facts: no
vars:
data_base_path: "/tmp/netcup-dns"
ipv4_path: "{{ data_base_path }}/IPv4"
Expand Down
4 changes: 4 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/bin/sh

echo "Creating cronjob with schedule: ${SCHEDULE}"
echo "${SCHEDULE} ansible-playbook /netcup-dns/ansible/update-dns.yaml" > /etc/crontabs/root

echo "Running command: '$@'"
exec "$@"

0 comments on commit a970bbc

Please sign in to comment.