Score:0

Ansible copy module - how to update file with an existing 'i' attribute?

de flag
  • I have a task in my playbook which should copy some files to a target directoy
  • The files should have an 'i' flag upon completion, so I set the attributes parameter of the copy like attributes: +i
  • this works for none existing files existing ones (which already have the 'i' attribute set before running the task) fail to be updated

can anyone advise me on how to solve this? I would think logically the module should check the existing files and (if the attribute exists) switch it off, and turn it back on after execution of copy. I would have any idea how to achieve this practically. Or is there any way to brute force my way through this?

Score:1
de flag

Or is there any way to brute force my way through this?

well, writing that sentence made me check the manual for copy once again more thouroughly ... and it seems adding force: yes to the copy task, does exactly that.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.