Nice article on tips for making the python2 code to be python 3 ready
http://stackful-dev.com/quick-tips-on-making-your-code-python-3-ready.html
[root@tiber ~]# cat hosts.yml
[nodes]
tiber
po
docker
[root@tiber ~]# cat play.yml- hosts: alltasks:- shell: "hostname"when: inventory_hostname != play_hosts[0][root@tiber ~]# ansible-playbook -i hosts.yml play.yml[WARNING]: The version of gmp you have installed has a known issue regardingtiming vulnerabilities when used with pycrypto. If possible, you should updateit (ie. yum update gmp).PLAY [all] ********************************************************************GATHERING FACTS ***************************************************************ok: [docker]ok: [tiber]ok: [po]TASK: [shell hostname] ********************************************************skipping: [tiber]changed: [docker]changed: [po]PLAY RECAP ********************************************************************docker : ok=2 changed=1 unreachable=0 failed=0po : ok=2 changed=1 unreachable=0 failed=0tiber : ok=1 changed=0 unreachable=0 failed=0