Thank you - I did that and it did use the right interpreter, but written this way the play has a new error:
"missing required arguments: bucket, mode"} This is the new play with the interpreter var: - name: downlod file from s3 with aws_s3 module aws_s3: vars: ansible_python_interpreter: /usr/bin/python3 bucket: launch-data object: jre-8u201-linux-x64.tar.gz dest: /home/ec2-user/updater/jre-8u201-linux-x64.tar.gz mode: get Is my syntax incorrect? On Monday, March 25, 2019 at 12:51:58 PM UTC-7, Jordan Borean wrote: > > Yes, just do the same vars directive on the task like you have done on the > play, e.g. > > - name: my task > ping: > vars: > ansible_python_interpreter: /usr/bin/python > > You would have to keep in mind variable precedence [1], task vars do beat > play vars but the following will beat task vars > > - Vars added with include_vars: > - Vars/facts added with set_fact or register > - Extra vars specified by '-e' when Ansible was invoked > > > [1] - > https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable > > Thanks > > Jordan > -- 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/280cf0bc-4f49-4b89-9125-64cb641f7894%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
