I ran into something interesting today. I am using the `copy` module
to copy a file from the management station to the managed host, and
then the `file` module to create a hard link to that same file
somewhere else. This works okay, on the first run, but subsequent runs
error out on the `copy` task.
Playbook snippet:
- name: ensure koji server ca certificate is available
copy: src=kojica.crt
dest=/etc/kojid/serverca.crt
mode=0644
owner=root
group=root
- name: ensure koji client ca certificate is available
file: path=/etc/kojid/clientca.crt
src=/etc/kojid/serverca.crt
mode=0644
owner=root
group=root
state=hard
On the first run, the file gets copied, and the link gets created. On
the second pass, this error is raised:
TASK: [koji-builder | ensure koji server ca certificate is available] *********
failed: [redacted] => {"failed": true, "gid": 0, "group": "root",
"md5sum": "redacted", "mode": "0644", "owner": "root", "path":
"/etc/kojid/serverca.crt", "size": 2252, "src": "kojica.crt", "state":
"hard", "uid": 0}
msg: src file does not exist, use "force=yes" if you really want to
create the link: /etc/kojid/kojica.crt
I think a clue is in `"state": "hard"`...where's that coming from? Why
would copy be trying to create a link?
Thoughts?
Dustin C. Hatch
http://dustin.hatch.name/
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAP8b%3DdzT5fn1L%3DSVc33%3DQTAGR9X0dzC5PvYjQiGmFX9H%3DWHh5w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.