Test with ansible_date_time.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
|
||||
- name: Docker backup
|
||||
- name: Minisforum backup
|
||||
hosts: all
|
||||
gather_facts: True
|
||||
|
||||
@@ -8,9 +8,13 @@
|
||||
- name: Include container variables
|
||||
include_vars: vars/minisforum.yaml
|
||||
|
||||
- name: Register date
|
||||
ansible.builtin.set_fact:
|
||||
date: "{{ ansible_date_time.iso8601_basic_short }}"
|
||||
|
||||
- name: Include the docker play
|
||||
import_playbook: docker-backup.yaml
|
||||
vars:
|
||||
backup_location: "/media/backup/docker/"
|
||||
containers: containers
|
||||
date: ansible_date_time.iso8601_basic_short
|
||||
date: ansible_facts.date
|
||||
|
||||
Reference in New Issue
Block a user