diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5eb9b67f..a6fa7928 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python_version: ['3.6'] + python_version: ['2.7', '3.7'] steps: - name: Check out code uses: actions/checkout@v2 @@ -37,6 +37,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: + # Our old integration tests fail under newer Python versions. python_version: ['3.6'] steps: - name: Check out code @@ -113,7 +114,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python_version: ['3.6'] + python_version: ['3.7'] steps: - name: Check out code uses: actions/checkout@v2 @@ -136,6 +137,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: + # Our old integration tests fail under newer Python versions. python_version: ['3.6'] steps: - name: Check out code diff --git a/changelogs/fragments/260_k8s-positional-args.yml b/changelogs/fragments/260_k8s-positional-args.yml new file mode 100644 index 00000000..18e18d75 --- /dev/null +++ b/changelogs/fragments/260_k8s-positional-args.yml @@ -0,0 +1,3 @@ +--- +bugfixes: + - k8s - Fix sanity test 'compile' failing because of positional args (https://github.com/ansible-collections/community.kubernetes/issues/260). diff --git a/plugins/modules/k8s.py b/plugins/modules/k8s.py index aacf3b5c..18e33dfe 100644 --- a/plugins/modules/k8s.py +++ b/plugins/modules/k8s.py @@ -277,7 +277,7 @@ class KubernetesModule(K8sAnsibleMixin): argument_spec['template'] = dict(type='raw', default=None) return argument_spec - def __init__(self, *args, k8s_kind=None, **kwargs): + def __init__(self, k8s_kind=None, *args, **kwargs): mutually_exclusive = [ ('resource_definition', 'src'), ('merge_type', 'apply'),