From 59b09ef8193a2b6f64f191ca12ff468dc8c8bf63 Mon Sep 17 00:00:00 2001 From: David Thurstenson Date: Fri, 11 Nov 2022 00:07:05 -0600 Subject: [PATCH] linode-dyndns: pull image, use image tag when creating the container, and have podman generate systemd units --- roles/linode-dyndns/tasks/main.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/roles/linode-dyndns/tasks/main.yml b/roles/linode-dyndns/tasks/main.yml index 634bcf2..8900289 100644 --- a/roles/linode-dyndns/tasks/main.yml +++ b/roles/linode-dyndns/tasks/main.yml @@ -7,10 +7,17 @@ skip_existing: yes data: {{ linode_api_key }} +- name: Pull linode-dyndns container image + podman_image: + name: {{ image_name }} + pull: yes + state: present + tag: {{ image_tag }} + - name: Create and start linode-dyndns container podman_container: name: linode-dyndns_{{ subdomain }} - image: docker.io/kvllsvm/linode-dynamic-dns:latest + image: {{ image_name }}:{{ image_tag }} state: started restart_policy: always network: host @@ -24,3 +31,5 @@ - name: FREQUENCY value: {{ update_frequency }} command: "/bin/sh -c 'export TOKEN=$(cat /run/secrets/linode_dns_apikey) && linode-dynamic-dns -s $FREQUENCY'" + generate_systemd: + path: {{ systemd_system_unit_path }}