Skip to content

Commit

Permalink
Fix ssh public key (#47)
Browse files Browse the repository at this point in the history
* Fix ssh public key

* Fix tests for Jinja2 3.x

* Fix tab indent

* Use matrix for CI build

* Update backup job

* Fix matrix

* Update to ansible 2.9
  • Loading branch information
snovikov authored Dec 13, 2022
1 parent d4c226f commit 3c4025d
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 27 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/backups.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
---

name: Backup Github Respository

# -------------------------------------------------------------------------------------------------
# When to run
# -------------------------------------------------------------------------------------------------
name: Backup Repository

on:
push:
Expand All @@ -13,11 +8,10 @@ on:

jobs:
backup:
uses: Flaconi/github-reusable-workflow/.github/workflows/backups.yml@stable
uses: Flaconi/github-reusable-workflow/.github/workflows/backups.yml@v1
with:
enabled: True
region: eu-central-1
secrets:
iam_role_arn: ${{ secrets.BACKUP_REPO_IAM_ROLE }}
bucket_name: ${{ secrets.BACKUP_REPO_BUCKET }}
git_read_token: ${{ secrets.REPO_READ_TOKEN }}
19 changes: 12 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,25 @@ name: CI build
on: [push]

jobs:
ci_test:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
uses: actions/checkout@v3

- name: Lint Files
run: |
make lint
- name: Test Asserts with sample value ansible=2.8
run: |
make test
test:
runs-on: ubuntu-latest
strategy:
matrix:
version: [2.9, latest]
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Test Asserts with sample value ansible=latest
- name: Test Asserts with for ansible=${{ matrix.version }}
run: |
make test ANSIBLE_VERSION=latest
make test ANSIBLE_VERSION=${{ matrix.version }}
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
###
### Variables
###
ANSIBLE_VERSION=2.8
ANSIBLE_VERSION=2.9


###
Expand All @@ -15,6 +15,7 @@ help:

test:
docker run --rm --pull=always \
--network=host \
-v ${PWD}:/etc/ansible/roles/rolename \
--workdir /etc/ansible/roles/rolename/tests \
flaconi/ansible:${ANSIBLE_VERSION} ./support/run-tests.sh
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ This Ansible role is tagged according to the latest compatible (and tested by us

## Requirements

* Ansible 2.8
* Ansible 2.9
* Python lib: [pyaml](https://github.com/yaml/pyyaml)
* Binary: [kops](https://github.com/kubernetes/kops/blob/master/docs/install.md)
* Binary: [kops](https://github.com/kubernetes/kops/blob/master/docs/install.md) 1.22+

## Run-time variables

Expand Down
2 changes: 1 addition & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ galaxy_info:
author: Patrick Plocke
license: Apache 2.0
description: Create customized KOPS (Kubernetes) templates.
min_ansible_version: 2.8
min_ansible_version: 2.9
platforms:
- name: all
versions:
Expand Down
14 changes: 7 additions & 7 deletions tasks/asserts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
assert:
that:
- item.enabled is defined
- item.enabled | type_debug == 'bool'
- item.enabled is boolean
msg: "enabled should be true or false"
with_items:
- >-
Expand Down Expand Up @@ -153,7 +153,7 @@
assert:
that:
- item.anonymousAuth is defined
- item.anonymousAuth | type_debug == 'bool'
- item.anonymousAuth is boolean
msg: "kubelet.anonymousAuth should be true or false"
with_items:
- >-
Expand All @@ -167,7 +167,7 @@
assert:
that:
- item.authenticationTokenWebhook is defined
- item.authenticationTokenWebhook | type_debug == 'bool'
- item.authenticationTokenWebhook is boolean
msg: "kubelet.authenticationTokenWebhook should be true or false"
with_items:
- >-
Expand Down Expand Up @@ -195,7 +195,7 @@
assert:
that:
- item.tlsCipherSuites is defined
- item.tlsCipherSuites | type_debug == "list"
- item.tlsCipherSuites is sequence
msg: "kops_kubelet.tlsCipherSuites should be list(string)"
with_items:
- >-
Expand All @@ -209,7 +209,7 @@
assert:
that:
- item.enableProfiling is defined
- item.enableProfiling | type_debug == 'bool'
- item.enableProfiling is boolean
msg: "kubeControllerManager.enableProfiling should be true or false"
with_items:
- >-
Expand Down Expand Up @@ -238,7 +238,7 @@
assert:
that:
- item.tlsCipherSuites is defined
- item.tlsCipherSuites | type_debug == "list"
- item.tlsCipherSuites is iterable
msg: "kube_controller_manager.tlsCipherSuites should be list(string)"
with_items:
- >-
Expand All @@ -252,7 +252,7 @@
assert:
that:
- item.enableProfiling is defined
- item.enableProfiling | type_debug == 'bool'
- item.enableProfiling is boolean
msg: "kubeScheduler.enableProfiling should be true or false"
with_items:
- >-
Expand Down
2 changes: 1 addition & 1 deletion tasks/run_kops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
export AWS_PROFILE="{{ kops_aws_profile | default('') }}";
fi
# Don't fail to show that remote has nothing yet
kops get secret admin --type SSHPublicKey -o table \
kops get sshpublickey \
--state s3://{{ cluster.s3_bucket_name }} \
--name {{ cluster.name }} \
| grep -Eo "[:a-f0-9]{16,}" || true
Expand Down

0 comments on commit 3c4025d

Please sign in to comment.