ansible-lint fix

This commit is contained in:
GomathiselviS
2024-01-30 13:09:52 -05:00
parent b01f78b0b7
commit c255d11c6e
12 changed files with 654 additions and 732 deletions

View File

@@ -1,6 +1,7 @@
---
profile: production
skip_list:
- meta-runtime[unsupported-version]
exclude_paths:
- tests/integration
- tests/sanity

1
.github/stale.yml vendored
View File

@@ -12,7 +12,6 @@ daysUntilClose: 30
# Only issues or pull requests with all of these labels are check if stale.
# Defaults to `[]` (disabled)
onlyLabels: []
# Issues or Pull Requests with these labels will never be considered stale. Set
# to `[]` to disable
exemptLabels:

View File

@@ -10,7 +10,7 @@ on:
- main
- stable-*
tags:
- '*'
- "*"
jobs:
linters:

View File

@@ -1,3 +1,4 @@
---
name: Unit tests
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -11,4 +12,4 @@ on:
jobs:
unit-source:
uses: GomathiselviS/github_actions/.github/workflows/unit_source.yml@add_host_pattern
uses: ansible-network/github_actions/.github/workflows/unit_source.yml@main

File diff suppressed because it is too large Load Diff

View File

@@ -10,21 +10,21 @@ notesdir: fragments
prelude_section_name: release_summary
prelude_section_title: Release Summary
sections:
- - major_changes
- Major Changes
- - minor_changes
- Minor Changes
- - breaking_changes
- Breaking Changes / Porting Guide
- - deprecated_features
- Deprecated Features
- - removed_features
- Removed Features (previously deprecated)
- - security_fixes
- Security Fixes
- - bugfixes
- Bugfixes
- - known_issues
- Known Issues
- - major_changes
- Major Changes
- - minor_changes
- Minor Changes
- - breaking_changes
- Breaking Changes / Porting Guide
- - deprecated_features
- Deprecated Features
- - removed_features
- Removed Features (previously deprecated)
- - security_fixes
- Security Fixes
- - bugfixes
- Bugfixes
- - known_issues
- Known Issues
title: Kubernetes Collection
trivial_section_name: trivial

View File

@@ -9,8 +9,8 @@ authors:
- mmazur (https://github.com/mmazur)
- jamescassell (https://github.com/jamescassell)
description: Kubernetes Collection for Ansible.
documentation: ''
homepage: ''
documentation: ""
homepage: ""
issues: https://github.com/ansible-collections/kubernetes.core/issues
license_file: LICENSE
namespace: kubernetes
@@ -28,4 +28,4 @@ tags:
version: 2.4.0
build_ignore:
- .DS_Store
- '*.tar.gz'
- "*.tar.gz"

View File

@@ -1,5 +1,5 @@
---
requires_ansible: '>=2.9.17'
requires_ansible: ">=2.9.17"
action_groups:
helm:
@@ -29,18 +29,18 @@ plugin_routing:
warning_text: Use kubernetes.core.k8s_info instead.
k8s_raw:
tombstone:
removal_version: 0.1.0
removal_version: "0.1.0"
warning_text: The k8s_raw module was slated for deprecation in Ansible 2.10 and has been removed. Use kubernetes.core.k8s instead.
openshift_raw:
tombstone:
removal_version: 0.1.0
removal_version: "0.1.0"
warning_text: The openshift_raw module was slated for deprecation in Ansible 2.10 and has been removed. Use kubernetes.core.k8s instead.
openshift_scale:
tombstone:
removal_version: 0.1.0
removal_version: "0.1.0"
warning_text: The openshift_scale module was slated for deprecation in Ansible 2.10 and has been removed. Use kubernetes.core.k8s_scale instead.
lookup:
openshift:
tombstone:
removal_version: 0.1.0
removal_version: "0.1.0"
warning_text: The openshift lookup plugin was slated for deprecation in Ansible 2.10 and has been removed. Use kubernetes.core.k8s instead.

View File

@@ -26,16 +26,16 @@ author:
"""
EXAMPLES = r"""
# Dump generated name for a configmap into a variable
- set_fact:
generated_name: '{{ definition | kubernetes.core.k8s_config_resource_name }}'
vars:
definition:
apiVersion: v1
kind: ConfigMap
metadata:
name: myconfigmap
namespace: mynamespace
# Dump generated name for a configmap into a variable
- set_fact:
generated_name: '{{ definition | kubernetes.core.k8s_config_resource_name }}'
vars:
definition:
apiVersion: v1
kind: ConfigMap
metadata:
name: myconfigmap
namespace: mynamespace
"""
RETURN = r"""

View File

@@ -27,7 +27,7 @@ DOCUMENTATION = """
connections:
description:
- Optional list of cluster connection settings. If no connections are provided, the default
I(~/.kube/config) and active context will be used, and objects will be returned for all namespaces
'~/.kube/config' and active context will be used, and objects will be returned for all namespaces
the active user is authorized to access.
suboptions:
name:
@@ -38,7 +38,7 @@ DOCUMENTATION = """
description:
- Path to an existing Kubernetes config file. If not provided, and no other connection
options are provided, the Kubernetes client will attempt to load the default
configuration file from I(~/.kube/config). Can also be specified via K8S_AUTH_KUBECONFIG
configuration file from '~/.kube/config'. Can also be specified via K8S_AUTH_KUBECONFIG
environment variable.
context:
description:
@@ -94,24 +94,24 @@ DOCUMENTATION = """
EXAMPLES = """
# File must be named k8s.yaml or k8s.yml
# Authenticate with token, and return all pods and services for all namespaces
plugin: kubernetes.core.k8s
connections:
- host: https://192.168.64.4:8443
api_key: xxxxxxxxxxxxxxxx
validate_certs: false
- name: Authenticate with token, and return all pods and services for all namespaces
plugin: kubernetes.core.k8s
connections:
- host: https://192.168.64.4:8443
api_key: xxxxxxxxxxxxxxxx
validate_certs: false
# Use default config (~/.kube/config) file and active context, and return objects for a specific namespace
plugin: kubernetes.core.k8s
connections:
- namespaces:
- testing
- name: Use default config (~/.kube/config) file and active context, and return objects for a specific namespace
plugin: kubernetes.core.k8s
connections:
- namespaces:
- testing
# Use a custom config file, and a specific context.
plugin: kubernetes.core.k8s
connections:
- kubeconfig: /path/to/config
context: 'awx/192-168-64-4:8443/developer'
- name: Use a custom config file, and a specific context.
plugin: kubernetes.core.k8s
connections:
- kubeconfig: /path/to/config
context: 'awx/192-168-64-4:8443/developer'
"""
import json

View File

@@ -257,10 +257,10 @@ EXAMPLES = r"""
kubernetes.core.k8s:
state: present
template:
- path: '/testing/deployment_one.j2'
- path: '/testing/deployment_two.j2'
variable_start_string: '[['
variable_end_string: ']]'
- path: '/testing/deployment_one.j2'
- path: '/testing/deployment_two.j2'
variable_start_string: '[['
variable_end_string: ']]'
- name: fail on validation errors
kubernetes.core.k8s:

View File

@@ -104,7 +104,7 @@ EXAMPLES = r"""
state: drain
name: foo
delete_options:
terminate_grace_period: 900
terminate_grace_period: 900
- name: Mark node "foo" as schedulable.
kubernetes.core.k8s_drain:
@@ -115,7 +115,6 @@ EXAMPLES = r"""
kubernetes.core.k8s_drain:
state: cordon
name: foo
"""
RETURN = r"""