Browse Source

Remove duplicate keys from yaml files

- removes duplicate keys from yaml files by assuming that the last
  one was the desired one (matches current loader behavior)
- prevent regressions by activating yaml lint rule that detects them
  (yaml skip was silencing all yaml checks, so the long list seen
  is in fact shorter than just 'yaml')
- includes sorting of some of the keys, was needed in order to spot
  the duplicates.

Change-Id: Idf5c0041a0c6d3ed7d5d49fb68be856719916663
changes/66/783066/3
Sorin Sbarnea 7 months ago
committed by Sorin Sbârnea
parent
commit
27788212cc
  1. 24
      .ansible-lint
  2. 24
      ci/environments/scenario010-multinode-containers.yaml
  3. 22
      ci/environments/scenario010-standalone.yaml
  4. 20
      ci/environments/scenario013-standalone.yaml
  5. 3
      deployment/barbican/barbican-api-container-puppet.yaml
  6. 1
      deployment/ceph-ansible/ceph-external.yaml
  7. 1
      deployment/cephadm/ceph-external.yaml
  8. 3
      deployment/gnocchi/gnocchi-api-container-puppet.yaml
  9. 1
      deployment/haproxy/haproxy-pacemaker-puppet.yaml
  10. 4
      deployment/neutron/neutron-api-container-puppet.yaml
  11. 1
      deployment/neutron/neutron-dhcp-container-puppet.yaml
  12. 3
      deployment/neutron/neutron-l3-container-puppet.yaml
  13. 4
      deployment/ovn/ovn-metadata-container-puppet.yaml
  14. 3
      sample-env-generator/ssl.yaml
  15. 2
      sample-env-generator/standalone.yaml
  16. 2
      tools/tests/nic_config_convert_samples/heat_templates/complex.yaml

24
.ansible-lint

@ -0,0 +1,24 @@
kinds:
- j2: "**/*.j2.yaml"
- playbook: "**/common/*.yml"
- yaml: "roles/*.yaml"
mock_modules:
- tripleo_all_nodes_data
skip_list:
# TODO(zbr): Address in follow-ups
- role-name
- unnamed-task
# yaml ones:
- braces
- colons
- commas
- comments
- comments-indentation
- empty-lines
- indentation
- line-length
- new-line-at-end-of-file
- trailing-spaces
- truthy
- brackets
- hyphens

24
ci/environments/scenario010-multinode-containers.yaml

@ -1,26 +1,24 @@
resource_registry:
OS::TripleO::Services::CephClient: ../../deployment/ceph-ansible/ceph-client.yaml
OS::TripleO::Services::CephMgr: ../../deployment/ceph-ansible/ceph-mgr.yaml
OS::TripleO::Services::CephMon: ../../deployment/ceph-ansible/ceph-mon.yaml
OS::TripleO::Services::CephOSD: ../../deployment/ceph-ansible/ceph-osd.yaml
OS::TripleO::Services::CephClient: ../../deployment/ceph-ansible/ceph-client.yaml
OS::TripleO::Services::HAproxy: ../../deployment/haproxy/haproxy-pacemaker-puppet.yaml
OS::TripleO::Services::Pacemaker: ../../deployment/pacemaker/pacemaker-baremetal-puppet.yaml
OS::TripleO::Services::PacemakerRemote: ../../deployment/pacemaker/pacemaker-remote-baremetal-puppet.yaml
OS::TripleO::Services::CinderApi: OS::Heat::None
OS::TripleO::Services::CinderBackup: OS::Heat::None
OS::TripleO::Services::CinderScheduler: OS::Heat::None
OS::TripleO::Services::CinderVolume: OS::Heat::None
OS::TripleO::Services::Clustercheck: ../../deployment/pacemaker/clustercheck-container-puppet.yaml
OS::TripleO::Services::HAproxy: ../../deployment/haproxy/haproxy-pacemaker-puppet.yaml
OS::TripleO::Services::MySQL: ../../deployment/database/mysql-pacemaker-puppet.yaml
OS::TripleO::Services::OctaviaApi: ../../deployment/octavia/octavia-api-container-puppet.yaml
OS::TripleO::Services::OctaviaHousekeeping: ../../deployment/octavia/octavia-housekeeping-container-puppet.yaml
OS::TripleO::Services::OctaviaDeploymentConfig: ../../deployment/octavia/octavia-deployment-config.yaml
OS::TripleO::Services::OctaviaHealthManager: ../../deployment/octavia/octavia-health-manager-container-puppet.yaml
OS::TripleO::Services::OctaviaHousekeeping: ../../deployment/octavia/octavia-housekeeping-container-puppet.yaml
OS::TripleO::Services::OctaviaWorker: ../../deployment/octavia/octavia-worker-container-puppet.yaml
OS::TripleO::Services::OctaviaDeploymentConfig: ../../deployment/octavia/octavia-deployment-config.yaml
OS::TripleO::Services::CinderApi: OS::Heat::None
OS::TripleO::Services::CinderBackup: OS::Heat::None
OS::TripleO::Services::CinderScheduler: OS::Heat::None
OS::TripleO::Services::CinderVolume: OS::Heat::None
OS::TripleO::Services::SwiftProxy: OS::Heat::None
OS::TripleO::Services::Pacemaker: ../../deployment/pacemaker/pacemaker-baremetal-puppet.yaml
OS::TripleO::Services::PacemakerRemote: ../../deployment/pacemaker/pacemaker-remote-baremetal-puppet.yaml
OS::TripleO::Services::SwiftDispersion: OS::Heat::None
OS::TripleO::Services::SwiftRingBuilder: OS::Heat::None
OS::TripleO::Services::SwiftStorage: OS::Heat::None
OS::TripleO::Services::SwiftProxy: OS::Heat::None
OS::TripleO::Services::SwiftRingBuilder: OS::Heat::None
OS::TripleO::Services::SwiftStorage: OS::Heat::None

22
ci/environments/scenario010-standalone.yaml

@ -1,26 +1,24 @@
resource_registry:
OS::TripleO::Services::CephClient: ../../deployment/ceph-ansible/ceph-client.yaml
OS::TripleO::Services::CephMgr: ../../deployment/ceph-ansible/ceph-mgr.yaml
OS::TripleO::Services::CephMon: ../../deployment/ceph-ansible/ceph-mon.yaml
OS::TripleO::Services::CephOSD: ../../deployment/ceph-ansible/ceph-osd.yaml
OS::TripleO::Services::CephClient: ../../deployment/ceph-ansible/ceph-client.yaml
OS::TripleO::Services::OsloMessagingRpc: ../../deployment/rabbitmq/rabbitmq-messaging-rpc-pacemaker-puppet.yaml
OS::TripleO::Services::OsloMessagingNotify: ../../deployment/rabbitmq/rabbitmq-messaging-notify-shared-puppet.yaml
OS::TripleO::Services::OctaviaApi: ../../deployment/octavia/octavia-api-container-puppet.yaml
OS::TripleO::Services::OctaviaHousekeeping: ../../deployment/octavia/octavia-housekeeping-container-puppet.yaml
OS::TripleO::Services::OctaviaHealthManager: ../../deployment/octavia/octavia-health-manager-container-puppet.yaml
OS::TripleO::Services::OctaviaWorker: ../../deployment/octavia/octavia-worker-container-puppet.yaml
OS::TripleO::Services::OctaviaDeploymentConfig: ../../deployment/octavia/octavia-deployment-config.yaml
OS::TripleO::Services::CinderApi: OS::Heat::None
OS::TripleO::Services::CinderBackup: OS::Heat::None
OS::TripleO::Services::CinderScheduler: OS::Heat::None
OS::TripleO::Services::CinderVolume: OS::Heat::None
OS::TripleO::Services::SwiftProxy: OS::Heat::None
OS::TripleO::Services::Horizon: OS::Heat::None
OS::TripleO::Services::OctaviaApi: ../../deployment/octavia/octavia-api-container-puppet.yaml
OS::TripleO::Services::OctaviaDeploymentConfig: ../../deployment/octavia/octavia-deployment-config.yaml
OS::TripleO::Services::OctaviaHealthManager: ../../deployment/octavia/octavia-health-manager-container-puppet.yaml
OS::TripleO::Services::OctaviaHousekeeping: ../../deployment/octavia/octavia-housekeeping-container-puppet.yaml
OS::TripleO::Services::OctaviaWorker: ../../deployment/octavia/octavia-worker-container-puppet.yaml
OS::TripleO::Services::OsloMessagingNotify: ../../deployment/rabbitmq/rabbitmq-messaging-notify-shared-puppet.yaml
OS::TripleO::Services::OsloMessagingRpc: ../../deployment/rabbitmq/rabbitmq-messaging-rpc-pacemaker-puppet.yaml
OS::TripleO::Services::SwiftDispersion: OS::Heat::None
OS::TripleO::Services::SwiftProxy: OS::Heat::None
OS::TripleO::Services::SwiftRingBuilder: OS::Heat::None
OS::TripleO::Services::SwiftStorage: OS::Heat::None
OS::TripleO::Services::SwiftRingBuilder: OS::Heat::None
OS::TripleO::Services::SwiftStorage: OS::Heat::None
OS::TripleO::Services::Horizon: OS::Heat::None
parameter_defaults:
StandaloneExtraConfig:

20
ci/environments/scenario013-standalone.yaml

@ -1,23 +1,21 @@
# This scenario is same as scenario10 but without Ceph.
resource_registry:
OS::TripleO::Services::Keepalived: OS::Heat::None
OS::TripleO::Services::OsloMessagingRpc: ../../deployment/rabbitmq/rabbitmq-messaging-rpc-container-puppet.yaml
OS::TripleO::Services::OctaviaApi: ../../deployment/octavia/octavia-api-container-puppet.yaml
OS::TripleO::Services::OctaviaHousekeeping: ../../deployment/octavia/octavia-housekeeping-container-puppet.yaml
OS::TripleO::Services::OctaviaHealthManager: ../../deployment/octavia/octavia-health-manager-container-puppet.yaml
OS::TripleO::Services::OctaviaWorker: ../../deployment/octavia/octavia-worker-container-puppet.yaml
OS::TripleO::Services::OctaviaDeploymentConfig: ../../deployment/octavia/octavia-deployment-config.yaml
OS::TripleO::Services::CinderApi: OS::Heat::None
OS::TripleO::Services::CinderBackup: OS::Heat::None
OS::TripleO::Services::CinderScheduler: OS::Heat::None
OS::TripleO::Services::CinderVolume: OS::Heat::None
OS::TripleO::Services::SwiftProxy: OS::Heat::None
OS::TripleO::Services::Horizon: OS::Heat::None
OS::TripleO::Services::Keepalived: OS::Heat::None
OS::TripleO::Services::OctaviaApi: ../../deployment/octavia/octavia-api-container-puppet.yaml
OS::TripleO::Services::OctaviaDeploymentConfig: ../../deployment/octavia/octavia-deployment-config.yaml
OS::TripleO::Services::OctaviaHealthManager: ../../deployment/octavia/octavia-health-manager-container-puppet.yaml
OS::TripleO::Services::OctaviaHousekeeping: ../../deployment/octavia/octavia-housekeeping-container-puppet.yaml
OS::TripleO::Services::OctaviaWorker: ../../deployment/octavia/octavia-worker-container-puppet.yaml
OS::TripleO::Services::OsloMessagingRpc: ../../deployment/rabbitmq/rabbitmq-messaging-rpc-container-puppet.yaml
OS::TripleO::Services::SwiftDispersion: OS::Heat::None
OS::TripleO::Services::SwiftProxy: OS::Heat::None
OS::TripleO::Services::SwiftRingBuilder: OS::Heat::None
OS::TripleO::Services::SwiftStorage: OS::Heat::None
OS::TripleO::Services::SwiftRingBuilder: OS::Heat::None
OS::TripleO::Services::SwiftStorage: OS::Heat::None
OS::TripleO::Services::Horizon: OS::Heat::None
parameter_defaults:
StandaloneExtraConfig:

3
deployment/barbican/barbican-api-container-puppet.yaml

@ -44,9 +44,6 @@ parameters:
default: {}
description: Parameters specific to the role
type: json
EnableInternalTLS:
type: boolean
default: false
BarbicanPkcs11CryptoATOSEnabled:
type: boolean
default: false

1
deployment/ceph-ansible/ceph-external.yaml

@ -81,4 +81,3 @@ outputs:
content: "{{ceph_ansible_group_vars_clients|to_nice_yaml}}"
external_update_tasks: {get_attr: [CephBase, role_data, external_update_tasks]}
external_upgrade_tasks: {get_attr: [CephBase, role_data, external_upgrade_tasks]}
config_settings: {}

1
deployment/cephadm/ceph-external.yaml

@ -79,4 +79,3 @@ outputs:
ceph_ansible_group_vars_clients: {get_attr: [CephExternalAnsibleVars, value, vars]}
external_update_tasks: []
external_upgrade_tasks: []
config_settings: {}

3
deployment/gnocchi/gnocchi-api-container-puppet.yaml

@ -105,9 +105,6 @@ parameters:
MonitoringSubscriptionGnocchiApi:
default: 'overcloud-gnocchi-api'
type: string
EnableInternalTLS:
type: boolean
default: false
GnocchiApiPolicies:
description: |
A hash of policies to configure for Gnocchi API.

1
deployment/haproxy/haproxy-pacemaker-puppet.yaml

@ -170,7 +170,6 @@ outputs:
tripleo::haproxy::haproxy_log_address: {get_param: HAProxySyslogAddress}
tripleo::haproxy::haproxy_log_facility: {get_param: HAProxySyslogFacility}
- haproxy_docker: true
tripleo::profile::pacemaker::haproxy_bundle::haproxy_docker_image: &haproxy_image {get_param: ContainerHAProxyImage}
tripleo::profile::pacemaker::haproxy_bundle::container_backend: {get_param: ContainerCli}
# the list of directories that contain the certs to bind mount in the countainer
# bind-mounting the directories rather than all the cert, key and pem files ensures

4
deployment/neutron/neutron-api-container-puppet.yaml

@ -102,9 +102,6 @@ parameters:
MonitoringSubscriptionNeutronServer:
default: 'overcloud-neutron-server'
type: string
EnableInternalTLS:
type: boolean
default: false
EnableSQLAlchemyCollectd:
type: boolean
description: >
@ -307,7 +304,6 @@ outputs:
neutron::keystone::authtoken::interface: 'internal'
neutron::quota::quota_port: {get_param: NeutronPortQuota}
neutron::quota::quota_security_group: {get_param: NeutronSecurityGroupQuota}
neutron::server::placement::region_name: {get_param: KeystoneRegion}
neutron::server::placement::password: {get_param: NovaPassword}
neutron::server::placement::www_authenticate_uri: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
neutron::server::placement::project_domain_name: 'Default'

1
deployment/neutron/neutron-dhcp-container-puppet.yaml

@ -494,7 +494,6 @@ outputs:
setfacl -R -m u:neutron:rw /var/lib/neutron
find /var/lib/neutron -type d -exec setfacl -m u:neutron:rwx '{}' \;
- name: Provide access for domain sockets
failed_when: false
become: true
shell: |
umask 0002

3
deployment/neutron/neutron-l3-container-puppet.yaml

@ -209,12 +209,11 @@ outputs:
- service_debug_unset
- {get_param: Debug}
- {get_param: NeutronL3AgentDebug}
-
- if:
- az_unset
- {}
- neutron::agents::l3::availability_zone: {get_param: NeutronL3AgentAvailabilityZone}
if:
- if:
- l3_agent_extensions_empty
- {}
- neutron::agents::l3::extensions: {get_param: NeutronL3AgentExtensions}

4
deployment/ovn/ovn-metadata-container-puppet.yaml

@ -92,10 +92,6 @@ parameters:
MonitoringSubscriptionOvnMetadata:
default: 'overcloud-ovn-metadata'
type: string
Debug:
type: boolean
default: false
description: Set to True to enable debugging on all services.
OvnMetadataAgentDebug:
default: ''
description: Set to True to enable debugging for OVN Metadata agent.

3
sample-env-generator/ssl.yaml

@ -406,9 +406,6 @@ environments:
deployment/haproxy/haproxy-pacemaker-puppet.yaml:
parameters:
- EnablePublicTLS
deployment/haproxy/haproxy-container-puppet.yaml:
parameters:
- EnablePublicTLS
sample_values:
EnablePublicTLS: false
# NOTE(bnemec): This is a bit odd, but it's the only way I've found that

2
sample-env-generator/standalone.yaml

@ -77,7 +77,6 @@ environments:
# Aodh
OS::TripleO::Services::AodhApi: OS::Heat::None
OS::TripleO::Services::AodhEvaluator: OS::Heat::None
OS::TripleO::Services::AodhEvaluator: OS::Heat::None
OS::TripleO::Services::AodhListener: OS::Heat::None
OS::TripleO::Services::AodhNotifier: OS::Heat::None
# Barbican
@ -194,7 +193,6 @@ environments:
# Aodh
OS::TripleO::Services::AodhApi: OS::Heat::None
OS::TripleO::Services::AodhEvaluator: OS::Heat::None
OS::TripleO::Services::AodhEvaluator: OS::Heat::None
OS::TripleO::Services::AodhListener: OS::Heat::None
OS::TripleO::Services::AodhNotifier: OS::Heat::None
# Barbican

2
tools/tests/nic_config_convert_samples/heat_templates/complex.yaml

@ -179,8 +179,6 @@ resources:
- /
- - get_param: ControlPlaneIp
- get_param: ControlPlaneEdge1SubnetCidr
routes:
routes:
list_concat_unique:
- default: true

Loading…
Cancel
Save