On Tue, 5 May 2020 00:02:40 +0200
Kai Stian Olstad <[email protected]> wrote:

> On Mon, May 04, 2020 at 11:19:53PM +0200, Vladimir Botka wrote:
> > There is no such problem with Ansible running on controller with Python 3  
> 
> That's just not true, your test method is flawed, you need to test it more 
> than one time.
> 
> $ for i in {1..100}; do >/tmp/txt; ansible-playbook test.yml &>/dev/null; 
> md5sum /tmp/txt; done | sort | uniq -c | sort -n
>       4 763950971c8c6d8df8a87a1e752799a9  /tmp/txt
>      11 1597a5a9948014489de663c8fb4438db  /tmp/txt
>      36 ac34af7b876f793d09a2225e23f43088  /tmp/txt
>      49 317f53fd9236220d0ab65e4aac4b3c5a  /tmp/txt
> 
> So as you can see I get 4 different result as expected.
> $ cat a1; md5sum a1
> a1
> 763950971c8c6d8df8a87a1e752799a9  a1
> $ cat a2; md5sum a2
> a2
> 1597a5a9948014489de663c8fb4438db  a2
> $ cat a1a2; md5sum a1a2
> a1
> a2
> 317f53fd9236220d0ab65e4aac4b3c5a  a1a2
> $ cat a2a1; md5sum a2a1
> a2
> a1
> ac34af7b876f793d09a2225e23f43088  a2a1


Well, it is true. There are no problems reported with your method either. I
get correct results only.

shell> for i in {1..100}; do >test-file; ansible-playbook pb.yml 2>/dev/null; 
md5sum test-file; done | sort | uniq -c | sort -n
     18 82de37d1deac8c90573c35e5637839d7  test-file
     82 6f4e9c06436257db5ba34d527bd3b211  test-file

shell> cat test_01test_02; md5sum test_01test_02
test_01
test_02
6f4e9c06436257db5ba34d527bd3b211  test_01test_02

shell> cat test_02test_01; md5sum test_02test_01
test_02
test_01
82de37d1deac8c90573c35e5637839d7  test_02test_01

shell> ansible --version
ansible 2.9.6
  config file = /home/vlado/.ansible.cfg
  configured module search path = ['/home/vlado/.ansible/my_modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.8.2 (default, Apr 27 2020, 15:53:34) [GCC 9.3.0]
--

-- 
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/20200505004710.0c307b39%40gmail.com.

Attachment: pgpX9pEK33HP2.pgp
Description: OpenPGP digital signature

Reply via email to