zuul/tests/fixtures/config
Ian Wienand 93d1d3be17 Support nodes setting 'auto' python-path
The nodepool "python-path" config variable makes it's way through from
the node arguments and ends up as the "ansible_python_interpreter"
variable for the inventory when running the job.

Notably, Python 3 only distributions require this to be set to
/usr/bin/python3 to avoid what can often be confusing red-herring
errors (e.g. things like dnf packages incorrectly appearing to be
missing on Fedora, for example [1]).

Upstream is aware of this often confusing behaviour and has made an
"ansible_python_interpreter" value of "auto" to, essentially, "do the
right thing" [2] and choose the right python for the target
environment.  This is available in Ansible >=2.8 and will become
default in 2.12.

This allows, and defaults to, an interpreter value of "auto" when
running with Ansible >=2.8.  On the supported prior Ansible releases,
"auto" will be translated into "/usr/bin/python2" to maintain
backwards compatability.  Of course a node explicity setting
"python-path" already will override this.

Nodepool is updated to set this by default with
I02a1a618c8806b150049e91b644ec3c0cb826ba4.

I think this is much more user friendly as it puts the work of
figuring out what platform has what interpreter into Ansible.  It
alleviates the need for admins to know anything at all about
"python-path" for node configurations unless they are actually doing
something out of the ordinary like using a virtualenv.  At the moment,
if you put a modern Python-3 only distro into nodepool, Zuul always
does the wrong thing by selecting /usr/bin/python2; you are left to
debug the failures and need to know to go and manually update the
python-path to Python 3.

Documentation is updated.  Detailed discussion is moved into the
executor section; the README is simplified a bit to avoid confusion.

A release note is added.

A test-case is added.  Note that it is also self-testing in that jobs
using Ansible 2.8 use the updated value
(c.f. I7cdcfc760975871f7fa9949da1015d7cec92ee67)

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1696404
[2] https://docs.ansible.com/ansible/2.8/reference_appendices/interpreter_discovery.html

Change-Id: I2b3bc6d4f873b7d653cfaccd1598464583c561e7
2019-09-19 10:28:53 +10:00
..
abstract Add abstract job attribute 2018-02-12 15:35:54 -08:00
allowed-projects Set allowed-projects on untrusted jobs with secrets 2019-01-22 14:01:10 -08:00
allowed-projects-trusted Allow config projects to override allowed-projects 2019-06-24 09:32:25 -07:00
ambiguous-names scheduler: fix enqueue event to use canonical project name 2018-07-13 06:58:36 +00:00
ansible Remove auto-add of localhost from unit test inventory 2019-09-12 14:42:09 +10:00
ansible-no-log Fix unreachable nodes detection 2018-09-29 13:13:00 +02:00
ansible-unreachable Also retry the job if a post job failed with unreachable 2018-09-29 13:13:01 +02:00
ansible-versions Support Ansible 2.8 2019-05-16 15:07:26 -04:00
authorization/single-tenant Web: plug the authorization engine 2019-07-30 15:32:31 +00:00
base-jobs Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
branch-deletion Fix branch deletion after failed reconfig 2018-02-14 14:26:31 -08:00
branch-mismatch Use override-checkout to select jobs 2018-01-24 13:06:04 -08:00
branch-negative Fix complex branch matchers in project configs 2017-12-01 15:25:13 -08:00
branch-tag Don't add implied branch matchers to project-pipeline variants 2018-06-27 10:43:56 -07:00
branch-templates Combine branch templates and pipeline branch matchers 2017-11-28 14:07:14 -08:00
branch-variants Update playbook paths with extension 2017-12-05 14:25:07 +11:00
broken Tolerate missing project 2019-04-05 17:26:34 +00:00
broken-trusted Config errors should not affect config-projects 2019-04-15 15:26:15 -07:00
build-page Add option to report build page 2019-08-08 09:46:53 -07:00
central-jobs Add multi-branch support for project-templates 2017-10-27 13:41:25 -07:00
cleanup-playbook Merge "Remove auto-add of localhost from unit test inventory" 2019-09-16 11:45:43 +00:00
conflict-config Require a base job 2017-08-07 14:52:37 -07:00
container-build-resources Fix container job documentation typo 2018-12-19 05:37:22 +00:00
cross-source Add cross-source tests 2018-01-16 09:37:59 -08:00
cross-source-pagure Pagure driver - https://pagure.io/pagure/ 2019-06-17 14:18:19 -07:00
data-return Fix node leak when skipping child jobs 2018-12-11 19:42:36 +01:00
dependency-graph Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
disk-accountant Sync when doing disk accountant testing 2018-02-06 15:03:04 -08:00
duplicate-pipeline Tenant config can be read from an external script 2018-04-03 14:33:41 +02:00
executor-facts Expose date time as facts 2019-06-18 12:19:18 +00:00
fail-fast Support fail-fast in project pipelines 2019-04-29 08:26:58 +02:00
final Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
force-merge-template Fix wedged scheduler on force-merge of non-existing template 2019-02-03 19:06:31 +01:00
gerrit-file-comments Remove auto-add of localhost from unit test inventory 2019-09-12 14:42:09 +10:00
git-driver Git driver 2017-12-15 14:32:40 +01:00
governor Executor: Don't start too many jobs at once 2018-02-02 11:36:49 -08:00
implicit-project Add implicit project name matching 2017-12-22 10:09:28 +01:00
implicit-roles Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
in-repo Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
in-repo-join Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
inventory Support nodes setting 'auto' python-path 2019-09-19 10:28:53 +10:00
job-output Remove auto-add of localhost from unit test inventory 2019-09-12 14:42:09 +10:00
job-pause Remove auto-add of localhost from unit test inventory 2019-09-12 14:42:09 +10:00
job-pause-priority Ensure correct lexical sorting of node requests 2019-03-14 15:39:23 +01:00
job-pause2 Remove auto-add of localhost from unit test inventory 2019-09-12 14:42:09 +10:00
job-update Run jobs when their own config changes 2019-07-08 15:47:25 -07:00
job-update-broken Handle existing broken config in job updates 2019-07-12 14:37:17 -07:00
line-mapping Remove auto-add of localhost from unit test inventory 2019-09-12 14:42:09 +10:00
merge-modes/git/common-config/playbooks Merge "Add playbooks for all test jobs" into feature/zuulv3 2017-02-06 16:45:58 +00:00
merges Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
mqtt-driver Report job depedencies via MQTT reporter 2019-05-23 12:56:50 +02:00
multi-driver Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
multi-tenant Add allowed-labels tenant setting 2018-11-27 06:00:54 +00:00
multi-tenant-semaphore web: remove SafeLoader left-over from ZuulJSONEncoder 2019-06-05 10:03:54 +00:00
nodesets Handle nodesets in branches 2018-01-18 13:38:13 -08:00
openstack Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
pass-to-parent pass-to-parent: Fix passing multiple secrets to parent 2019-05-20 15:33:52 +02:00
post-playbook Remove auto-add of localhost from unit test inventory 2019-09-12 14:42:09 +10:00
pragma Add pragma directive 2017-10-26 14:28:03 -07:00
pragma-multibranch Add implied-branches pragma directive 2017-12-13 16:06:34 -08:00
pre-playbook Remove auto-add of localhost from unit test inventory 2019-09-12 14:42:09 +10:00
protected Add support for protected jobs 2017-12-15 19:31:02 +01:00
provides-requires-buildset Handle artifacts on non change types. 2019-05-15 10:45:11 -07:00
provides-requires-pause Remove auto-add of localhost from unit test inventory 2019-09-12 14:42:09 +10:00
push-reqs Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
regex-project Add regex support to project stanzas 2018-04-27 21:35:07 +02:00
remote-action-modules Disable rsh synchronize rsync_opts 2019-09-16 16:25:11 +00:00
remote-zuul-json Add role information to task in zuul_json callback 2018-05-08 14:13:35 +02:00
remote-zuul-stream zuul-tox-remote: use unique zuul_console service 2019-05-17 07:56:58 +00:00
requirements Fix reject clauses in the absence of approvals 2018-08-13 12:37:32 +02:00
role-branches Check out more appropriate branches of role and playbook repos 2018-04-05 10:41:51 -07:00
roles Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
secret-inheritance Set allowed-projects on untrusted jobs with secrets 2019-01-22 14:01:10 -08:00
secret-leaks Remove auto-add of localhost from unit test inventory 2019-09-12 14:42:09 +10:00
secrets Remove auto-add of localhost from unit test inventory 2019-09-12 14:42:09 +10:00
semaphore Fix rare semaphore leak during reconfiguration 2019-02-25 15:38:24 +01:00
semaphore-branches Normalize semaphore branch handling 2018-01-18 14:53:15 -08:00
shadow Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
single-tenant model: add cleanup-run to the job configuration 2019-05-29 05:42:48 +00:00
speculative-plugins Fix plugin injection vulnerability 2018-03-16 18:12:35 +01:00
split-config Fix source context in split config 2018-07-05 09:50:58 -07:00
sql-driver Remove auto-add of localhost from unit test inventory 2019-09-12 14:42:09 +10:00
streamer Remove auto-add of localhost from unit test inventory 2019-09-12 14:42:09 +10:00
success-url Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
templated-project Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
tenant-parser Add Authorization Rules configuration 2019-07-30 15:32:15 +00:00
unprotected-branches Filter out unprotected branches from builds if excluded 2019-06-25 20:49:54 +02:00
zuul-connections-multiple-gerrits Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
zuul-connections-same-gerrit Update test fixtures to use explicit run 2017-10-26 15:59:41 -07:00
zuul-job-contamination Fix job contamination by unmerged change 2018-07-09 22:37:19 +02:00
zuultrigger Limit search scope of getChangesDependingOn to tenant 2018-05-24 00:15:51 +00:00