--- - name: start ddclient systemd: name: ddclient state: started enabled: yes - name: restart ddclient systemd: name: ddclient state: restarted enabled: yes - name: restart docker ddclient community.general.docker_container: name: "{{ ddclient_container_name }}" image: "{{ ddclient_container_registry }}/{{ ddclient_image_name }}:{{ ddclient_image_tag }}" network_mode: "{{ ddclient_network_mode }}" state: started restart: yes container_default_behavior: no_defaults detach: true restart_policy: unless-stopped volumes: - "/opt/{{ ddclient_namespace }}/ddclient.conf:/config/ddclient.conf" - "/opt/{{ ddclient_namespace }}/Kvps.key:/config/Kvps.key" - "/opt/{{ ddclient_namespace }}/Kvps.private:/config/Kvps.private" when: ddclient_container_engine == 'docker' - name: restart podman ddclient community.general.podman_container: name: "{{ ddclient_container_name }}" hostname: "{{ ddclient_container_name }}" network: "{{ ddclient_network_mode }}" image: "{{ ddclient_container_registry }}/{{ ddclient_image_name }}:{{ ddclient_image_tag }}" state: started restart: yes volumes: - "/opt/{{ ddclient_namespace }}/ddclient.conf:/config/ddclient.conf" - "/opt/{{ ddclient_namespace }}/Kvps.key:/config/Kvps.key" - "/opt/{{ ddclient_namespace }}/Kvps.private:/config/Kvps.private" when: ddclient_container_engine == 'podman'