Commit Graph

6 Commits

Author SHA1 Message Date
Ian Wienand 6d23d20f2f linters: add names to blocks
This is preparation for a later version of ansbile-lint, which finds
missing names on blocks.  This seems a reasonable rule, and the
Ansible manual says [1]

  Names for blocks have been available since Ansible 2.3. We recommend
  using names in all tasks, within blocks or elsewhere, for better
  visibility into the tasks being executed when you run the playbook.

This simply adds a name tag for blocks that are missing it.  This
should have no operational change, but allows us to update the linter
in a follow-on change.

[1] https://docs.ansible.com/ansible/latest/user_guide/playbooks_blocks.html

Change-Id: I92ed4616775650aced352bc9088a07e919f1a25f
2022-07-27 17:13:39 +10:00
Bogdan Dobrelya db6677a867 Fix evaluating nodepool_ip and switch_ip facts
In I32fb17bae98f13f735da4d5b9a6a01e948f21678, the evaluated facts
should also fallback to public_ipv4, when private_ipv4 is "empty-like",
e.g. contains no valid IP but something like '\n'.

It also restores the lost switch_private_ip fact just in case.

Change-Id: I139272746129213994f298a4a9178b4441d439af
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
2019-09-10 17:54:17 +02:00
Jeremy Stanley 2711d10186 Be consistent about spaces before and after vars
With the arrival of ansible-lint 4, Jinja2 variable expansions must
include spaces before and after the variable name inside the
brackets.

Adjust the new violations accordingly and remove the rule
206 exclusion.

Change-Id: Ib3ff7b0233a5d5cf99772f9c2adc81861cf34ffa
2019-08-07 20:17:41 +01:00
Ronelle Landy 9853d3608f Default private_ipv4 to use public_ipv4 address when null
The static zuul driver returns only a public_ipv4 address for
nodes in use. The multinode bridge role accesses the node
private_ipv4 address. As such, when the private address is
empty/null the role fails.

This review defaults that private address so that the role
uses the public address when the private address is null.

Change-Id: I32fb17bae98f13f735da4d5b9a6a01e948f21678
2019-01-23 10:30:20 +01:00
Mohammed Naser fbb58ddfde Add PATH to `ip` command execution
It seems that there has been a recent change where the PATH used
has changed somehow.  This adds it and make sure that it covers
all 3 major distros location where `ip` is stored.

Change-Id: Ic3c255bd24d1202fec436d4fcc484ce420110518
2018-06-18 17:37:10 -04:00
David Moreau-Simard 645a3935ee
Multi-node: Set up connectivity with default OVS bridge
This sets up a default 'br-infra' bridge between nodes in a multi-node
job. Two groups are expected in order for this to be set up:
- switch
- peers

The 'switch' group, with only one expected member, will be set up as
the switch node while the 'peers' group will be connected to the switch
node with virtual ports.

The default settings such as the bridge name, the IP range used, the MTU
and so on can be overridden at the job level by setting vars.

Change-Id: If5a3f512837e5b235bd2f6dbfdbb454435aa983e
2017-09-26 15:32:02 -04:00