docker-centos7-ansible icon indicating copy to clipboard operation
docker-centos7-ansible copied to clipboard

behavior with fact script

Open stefangweichinger opened this issue 3 years ago • 0 comments

In my small role https://github.com/stefangweichinger/ansible-rclone I use your images to run molecule tests.

In this issue https://github.com/stefangweichinger/ansible-rclone/issues/80 and the resulting PR https://github.com/stefangweichinger/ansible-rclone/pull/82 I added a check script template:

https://github.com/stefangweichinger/ansible-rclone/blob/master/templates/etc/ansible/facts.d/rclone.fact.j2

It should check if the binary exists and report back the variable "ansible_facts.ansible_local.rclone.installed".

In the ansible/molecule runs that variable is always "false" for the centos7 instances (at the 2nd run, sure, when the binary is there already), but when I login to the same instance and run the fact-script the variable is "true":

[root@instance-centos7 /]# /etc/ansible/facts.d/rclone.fact 
{
    "configured": true, 
    "installed": true, 
    "installed_version": "1.54.1"
}

Do you know the reason, did you see such a behavior as well?

I also tested your tag "python3", same behavior.

Maybe you have an idea here, thanks.

stefangweichinger avatar Mar 17 '21 17:03 stefangweichinger