10 Commits

Author SHA1 Message Date
Albin Vass
9062289151 Check for loop_control in with_ type loops
Change-Id: I191265df7709a6262b44a428d78fe28ffaeb4b75
2020-05-01 13:45:34 +02:00
Andreas Jaeger
f0cff4d4e9 Add missing README.rst for roles
Newer zuul-sphinx check that a README.rst exists for each role, add
missing ones.

Change-Id: I8e884934a45219977f4389c9ff040e31aec63f18
2018-09-05 19:35:53 +00:00
Ian Wienand
eee316ce7b Enable Python 2.7 unit tests
Add a testenv:py27 environment that overrides basepython to 2.7

Unfortunately implicit namespace packages are a Python3 thing [1] so
we have to scatter a few __init__.py's around for the test loader
under python2 to be able to find the unit test directories.

Update documenation to mention this

Needed-By: https://review.openstack.org/592768

[1] https://www.python.org/dev/peps/pep-0420/

Change-Id: I9a653666e8a083fb7f3fbb92589fe0467a41e6e6
2018-08-17 10:23:20 +10:00
Zuul
3535aa0e43 Merge "Add a python unit test framework" 2018-07-25 20:45:03 +00:00
James E. Blair
1548d82ffd Add a python unit test framework
Add a unit testing framework for python roles.  Thanks to Matthew
Treinish for the suggestion of how to perform discovery (and much of the
code which is copied from Tempest).

Change-Id: Iec95dd1026a41614def57c65c3faa0516a682a5a
2018-07-25 09:11:25 -07:00
Monty Taylor
054812719f
Scope all_known_hosts in mult-node-known-hosts
Ansible is moving towards ansible_facts return values going in to
ansible_facts rather than the top-level dict. ansible_facts exists
starting in ansible 2.5, so go ahead and start consuming the value that
way.

Change-Id: Iac13b1efb47c9d79ed088e1cf9176003790c74f7
2018-07-23 13:21:39 -05:00
Andrea Frittoli
870298bf54 Add known hosts for all users
The role today only adds known hosts for the zuul user.
This replicates what d-g does today by adding a default known_hosts
file which applies to all users.

We csnnot remove the original task that adds for the zuul user since
there's a unit test in openstack-zuul-jons that expects that.

Depends-on: https://review.openstack.org/550425/

Change-Id: I54d4d975fa54cbb6df7dbed525211ab5c2cd6754
2018-03-07 11:03:24 +00:00
David Moreau-Simard
e748a8a56b
Multi-node: Streamline multi-node-known-hosts
We're now evaluating the condition whether or not to run this role
at the playbook level instead since there are different roles using
this same condition.

Change-Id: I99738c7e98133838f989ed369a09ecb6a7b64054
2017-09-26 15:32:07 -04:00
Monty Taylor
5cdacdfbf4
Handle floating ips in multi-node-known-hosts
Nodes (and ansible) don't know about floating ips because they are
external. However, they are valid interfaces over which nodes might talk
to each other- especially if we're re-using the inventory generated for
the jobs.

Start off by grabbing all of the addresses from nodepool, if they exist.
Then do the loop for finding the addresses we want. Then collapse
that list with set and do a pass to create the actual list of hosts and
keys needed.

Change-Id: I748fae1c86d7bb9333dc251991308282858811a4
2017-09-06 16:33:28 -05:00
Clint Byrum
cc2ed9fa5f Add known_hosts generation for multiple nodes
Things will need to be done a bit differently for localhost-ssh, so this
is just for the case of multiple nodes needing to be able to SSH to
eachother.

Change-Id: I941cf3de7691ee1b5277ca50c7bb9daa5b9a0732
2017-08-22 13:56:16 -07:00