Skip to content

Commit 3c4025d

Browse files
authored
Fix ssh public key (#47)
* 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
1 parent d4c226f commit 3c4025d

File tree

7 files changed

+27
-27
lines changed

7 files changed

+27
-27
lines changed

.github/workflows/backups.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
---
2-
3-
name: Backup Github Respository
4-
5-
# -------------------------------------------------------------------------------------------------
6-
# When to run
7-
# -------------------------------------------------------------------------------------------------
2+
name: Backup Repository
83

94
on:
105
push:
@@ -13,11 +8,10 @@ on:
138

149
jobs:
1510
backup:
16-
uses: Flaconi/github-reusable-workflow/.github/workflows/backups.yml@stable
11+
uses: Flaconi/github-reusable-workflow/.github/workflows/backups.yml@v1
1712
with:
1813
enabled: True
1914
region: eu-central-1
2015
secrets:
2116
iam_role_arn: ${{ secrets.BACKUP_REPO_IAM_ROLE }}
2217
bucket_name: ${{ secrets.BACKUP_REPO_BUCKET }}
23-
git_read_token: ${{ secrets.REPO_READ_TOKEN }}

.github/workflows/ci.yaml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,25 @@ name: CI build
33
on: [push]
44

55
jobs:
6-
ci_test:
6+
lint:
77
runs-on: ubuntu-latest
88
steps:
99
- name: Checkout repository
10-
uses: actions/checkout@master
10+
uses: actions/checkout@v3
1111

1212
- name: Lint Files
1313
run: |
1414
make lint
1515
16-
- name: Test Asserts with sample value ansible=2.8
17-
run: |
18-
make test
16+
test:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
version: [2.9, latest]
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v3
1924

20-
- name: Test Asserts with sample value ansible=latest
25+
- name: Test Asserts with for ansible=${{ matrix.version }}
2126
run: |
22-
make test ANSIBLE_VERSION=latest
27+
make test ANSIBLE_VERSION=${{ matrix.version }}

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
###
22
### Variables
33
###
4-
ANSIBLE_VERSION=2.8
4+
ANSIBLE_VERSION=2.9
55

66

77
###
@@ -15,6 +15,7 @@ help:
1515

1616
test:
1717
docker run --rm --pull=always \
18+
--network=host \
1819
-v ${PWD}:/etc/ansible/roles/rolename \
1920
--workdir /etc/ansible/roles/rolename/tests \
2021
flaconi/ansible:${ANSIBLE_VERSION} ./support/run-tests.sh

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ This Ansible role is tagged according to the latest compatible (and tested by us
1919

2020
## Requirements
2121

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

2626
## Run-time variables
2727

meta/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ galaxy_info:
66
author: Patrick Plocke
77
license: Apache 2.0
88
description: Create customized KOPS (Kubernetes) templates.
9-
min_ansible_version: 2.8
9+
min_ansible_version: 2.9
1010
platforms:
1111
- name: all
1212
versions:

tasks/asserts.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
assert:
9595
that:
9696
- item.enabled is defined
97-
- item.enabled | type_debug == 'bool'
97+
- item.enabled is boolean
9898
msg: "enabled should be true or false"
9999
with_items:
100100
- >-
@@ -153,7 +153,7 @@
153153
assert:
154154
that:
155155
- item.anonymousAuth is defined
156-
- item.anonymousAuth | type_debug == 'bool'
156+
- item.anonymousAuth is boolean
157157
msg: "kubelet.anonymousAuth should be true or false"
158158
with_items:
159159
- >-
@@ -167,7 +167,7 @@
167167
assert:
168168
that:
169169
- item.authenticationTokenWebhook is defined
170-
- item.authenticationTokenWebhook | type_debug == 'bool'
170+
- item.authenticationTokenWebhook is boolean
171171
msg: "kubelet.authenticationTokenWebhook should be true or false"
172172
with_items:
173173
- >-
@@ -195,7 +195,7 @@
195195
assert:
196196
that:
197197
- item.tlsCipherSuites is defined
198-
- item.tlsCipherSuites | type_debug == "list"
198+
- item.tlsCipherSuites is sequence
199199
msg: "kops_kubelet.tlsCipherSuites should be list(string)"
200200
with_items:
201201
- >-
@@ -209,7 +209,7 @@
209209
assert:
210210
that:
211211
- item.enableProfiling is defined
212-
- item.enableProfiling | type_debug == 'bool'
212+
- item.enableProfiling is boolean
213213
msg: "kubeControllerManager.enableProfiling should be true or false"
214214
with_items:
215215
- >-
@@ -238,7 +238,7 @@
238238
assert:
239239
that:
240240
- item.tlsCipherSuites is defined
241-
- item.tlsCipherSuites | type_debug == "list"
241+
- item.tlsCipherSuites is iterable
242242
msg: "kube_controller_manager.tlsCipherSuites should be list(string)"
243243
with_items:
244244
- >-
@@ -252,7 +252,7 @@
252252
assert:
253253
that:
254254
- item.enableProfiling is defined
255-
- item.enableProfiling | type_debug == 'bool'
255+
- item.enableProfiling is boolean
256256
msg: "kubeScheduler.enableProfiling should be true or false"
257257
with_items:
258258
- >-

tasks/run_kops.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
export AWS_PROFILE="{{ kops_aws_profile | default('') }}";
9292
fi
9393
# Don't fail to show that remote has nothing yet
94-
kops get secret admin --type SSHPublicKey -o table \
94+
kops get sshpublickey \
9595
--state s3://{{ cluster.s3_bucket_name }} \
9696
--name {{ cluster.name }} \
9797
| grep -Eo "[:a-f0-9]{16,}" || true

0 commit comments

Comments
 (0)