I need to repair some templated files from a previous playbook execution

##### this is a test #########################################

  - name: my template TEST - template postgres.conf
    vars:
      - pg_service_name: "{{ item }}"
    ansible.builtin.template:
      src: 00-ina-default.conf.j2       # 10-pg-service.conf
      dest: "/home/postgres/{{ pg_service_name }}/00-ina-default.conf"
      owner: postgres
      group: postgres
      force: true
      backup: true
      mode: 0600
    become: true
    loop:
      - somedir

##### this was a test ########################################

this works whether dest does not exist. I want to overwrite an existing file 
though. This file possibly is or is not identical.

Can it be the force only works when the new and the old file differ?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1890057150.554463.1668087697988%40office.mailbox.org.

Reply via email to