tinypilot
tinypilot copied to clipboard
Upgrade to Ansible 2.10.7.
Part of https://github.com/tiny-pilot/ansible-role-tinypilot-pro/issues/119 Dependent on https://github.com/tiny-pilot/ansible-role-tinypilot/pull/213
This PR upgrades Ansible from 2.9.13
to 2.10.7
. For context, please review https://github.com/tiny-pilot/ansible-role-tinypilot/pull/213 before reviewing this PR.
This PR has been successfully built here.
Notes
-
There seemed to be a behavioural change from Ansible
2.9
to2.10
. Theansible_user
parameter no longer gets automatically defined during a local Ansible connection. As seen by this failed build (after upgrading Ansible):The task includes an option with an undefined variable. The error was: 'ansible_user' is undefined
We felt this issue before when we had to set
ansible_user: root
for our molecule tests.ansible_user
is a strange variable because it can either inherit its value fromremote_user
(i.e. ssh user) or be explicitly defined. However, ifremote_user
is not set (as is with a local connection) thenansible_user
will also be undefined. This is vaguely described in the Ansible docs, but confirmed during local testing.I'm not sure why this ever worked for us in the past, but now in Ansible
2.10
ansible_user
is always undefined because we use a local connection and we never specify a user when runningansible-playbook
.We can fix the issue in 2 ways:
- (implemented here) Explicitly set a
remote_user
via theansible-playbook --user "${USER}"
argument, or - Statically set
remote_user = root
in ouransible.cfg
file. This would also work for us because our bundleinstall
script requiressudo
privileges so the user will always be root.
- (implemented here) Explicitly set a
Automated comment from CodeApprove ➜
Approved: I have approved this change on CodeApprove and all of my comments have been resolved.
This CodeApprove comment is misleading because yes all your comments have been resolved, but I just added an unresolved comment. So I don't agree that the above comment should be all "green and good to go".

This CodeApprove comment is misleading because yes all your comments have been resolved, but I just added an unresolved comment. So I don't agree that the above comment should be all "green and good to go".
Oh, I'm not sure what correct behavior would be in this case, since you did address all my comments. Should we file a bug on CodeApprove requesting different behavior?
Oh, I'm not sure what correct behavior would be in this case, since you did address all my comments. Should we file a bug on CodeApprove requesting different behavior?
Yeah, the current behavior feels misleading to me, but it's just a personal preference. I'll file an issue on their GitHub and let them decide.