Skip to content

Commit 6eaf179

Browse files
Merge pull request #1201 from archana203/yamllint
Fix the line-length warnings and enable yamllint strict mode
2 parents 4f10546 + ddaf5e8 commit 6eaf179

6 files changed

Lines changed: 31 additions & 6 deletions

File tree

.github/workflows/sync_branches_with_ext_trigger.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Sync a target branch with source branch
3-
on:
3+
on: # yamllint disable-line rule:truthy
44
repository_dispatch:
55
types: [trigger-sync]
66

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,8 @@ repos:
3636
# E040: Syntax error determined using `bash -n` (as many scripts
3737
# use jinja templating, this will often fail and the syntax
3838
# error will be discovered in execution anyway)
39+
- repo: https://github.com/adrienverge/yamllint.git
40+
rev: v1.38.0
41+
hooks:
42+
- id: yamllint
43+
args: [-s]

tests/roles/barbican_adoption/tasks/main.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
{{ shell_header }}
44
{{ oc_header }}
55
CONTROLLER1_SSH="{{ controller1_ssh }}"
6-
oc set data secret/osp-secret "BarbicanSimpleCryptoKEK=$($CONTROLLER1_SSH "sudo python3 -c \"import configparser; c = configparser.ConfigParser(); c.read('/var/lib/config-data/puppet-generated/barbican/etc/barbican/barbican.conf'); print(c['simple_crypto_plugin']['kek'])\"")"
6+
oc set data secret/osp-secret "BarbicanSimpleCryptoKEK=$($CONTROLLER1_SSH \
7+
"sudo python3 -c \"import configparser; c = configparser.ConfigParser(); \
8+
c.read('/var/lib/config-data/puppet-generated/barbican/etc/barbican/barbican.conf'); \
9+
print(c['simple_crypto_plugin']['kek'])\"")"
710
811
- name: Create HSM login secret for Barbican
912
when: barbican_hsm_enabled|default(false)

tests/roles/common_defaults/defaults/main.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ mariadb_copy_shell_vars_src: |-
148148
MARIADB_CLIENT_ANNOTATIONS={{ deploy_ctlplane_ospdo | default(false) | bool | ternary('-n $NAMESPACE', mariadb_client_network_annotation) }}
149149
MARIADB_RUN_OVERRIDES={{ deploy_ctlplane_ospdo | default(false) | bool | ternary("--overrides=${RUN_OVERRIDES} $MARIADB_CLIENT_ANNOTATIONS {{ mysql_client_override }}", "$MARIADB_CLIENT_ANNOTATIONS") }}
150150
151-
OSPDO_MARIADB_CLIENT_ANNOTATIONS='[{"name": "internalapi-static","ips": ["{% if ipv6_enabled | default(false) %}{{ internalapi_prefix_ipv6 | default('2620:cf:cf:bbbb') }}::99/64{% else %}{{ internalapi_prefix | default('172.17.0') }}.99/24{% endif %}"]}]'
151+
OSPDO_MARIADB_CLIENT_ANNOTATIONS='[{"name": "internalapi-static","ips": \
152+
["{% if ipv6_enabled | default(false) %}{{ internalapi_prefix_ipv6 | default('2620:cf:cf:bbbb') }}::99/64\
153+
{% else %}{{ internalapi_prefix | default('172.17.0') }}.99/24{% endif %}"]}]'
152154
153155
{{ pull_openstack_configuration_ssh_shell_vars }}
154156

tests/roles/dataplane_adoption/defaults/main.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,20 @@ edpm_network_config_template_bgp: |
206206
{% endraw %}
207207
neutron_physical_bridge_name: br-ctlplane
208208
neutron_public_interface_name: "{{ dataplane_public_iface | default('eth0') }}"
209-
edpm_sshd_allowed_ranges: "{% if ipv6_enabled | default(false) %}{{ [ctlplane_prefix_ipv6 | default('fd00:aaaa') + '::/64'] if dataplane_os_net_config_set_route|default(true)|bool else ['::/0'] }}{% else %}{{ [ctlplane_prefix | default('192.168.122') + '.0/24'] if dataplane_os_net_config_set_route|default(true)|bool else ['0.0.0.0/0'] }}{% endif %}"
209+
edpm_sshd_allowed_ranges: >
210+
{% if ipv6_enabled | default(false) %}
211+
{{
212+
[ctlplane_prefix_ipv6 | default('fd00:aaaa') + '::/64']
213+
if dataplane_os_net_config_set_route|default(true)|bool
214+
else ['::/0']
215+
}}
216+
{% else %}
217+
{{
218+
[ctlplane_prefix | default('192.168.122') + '.0/24']
219+
if dataplane_os_net_config_set_route|default(true)|bool
220+
else ['0.0.0.0/0']
221+
}}
222+
{% endif %}
210223
edpm_neutron_sriov_agent_enabled: true
211224
edpm_neutron_dhcp_agent_enabled: true
212225
nova_libvirt_backend: local

tests/roles/ovn_adoption/tasks/main.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,10 @@
243243
{{ oc_header }}
244244
{{ ovn_copy_shell_vars }}
245245
246-
oc exec ovn-copy-data -- bash -c "ovsdb-client get-schema --ca-cert=/etc/pki/tls/misc/ca.crt --private-key=/etc/pki/tls/misc/tls.key --certificate=/etc/pki/tls/misc/tls.crt ssl:$PODIFIED_OVSDB_NB_IP:6641 > /backup/ovs-nb.ovsschema && ovsdb-tool convert /backup/ovs-nb.db /backup/ovs-nb.ovsschema"
247-
oc exec ovn-copy-data -- bash -c "ovsdb-client get-schema --ca-cert=/etc/pki/tls/misc/ca.crt --private-key=/etc/pki/tls/misc/tls.key --certificate=/etc/pki/tls/misc/tls.crt ssl:$PODIFIED_OVSDB_SB_IP:6642 > /backup/ovs-sb.ovsschema && ovsdb-tool convert /backup/ovs-sb.db /backup/ovs-sb.ovsschema"
246+
oc exec ovn-copy-data -- bash -c "ovsdb-client get-schema --ca-cert=/etc/pki/tls/misc/ca.crt --private-key=/etc/pki/tls/misc/tls.key \
247+
--certificate=/etc/pki/tls/misc/tls.crt ssl:$PODIFIED_OVSDB_NB_IP:6641 > /backup/ovs-nb.ovsschema && ovsdb-tool convert /backup/ovs-nb.db /backup/ovs-nb.ovsschema"
248+
oc exec ovn-copy-data -- bash -c "ovsdb-client get-schema --ca-cert=/etc/pki/tls/misc/ca.crt --private-key=/etc/pki/tls/misc/tls.key \
249+
--certificate=/etc/pki/tls/misc/tls.crt ssl:$PODIFIED_OVSDB_SB_IP:6642 > /backup/ovs-sb.ovsschema && ovsdb-tool convert /backup/ovs-sb.db /backup/ovs-sb.ovsschema"
248250
when: enable_tlse|bool
249251

250252
- name: restore OVN database backups to podified ovsdb-servers

0 commit comments

Comments
 (0)