summaryrefslogtreecommitdiff
path: root/roles/kubernetes/base/tasks/main.yml
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2019-09-28 02:12:51 +0200
committerChristian Pointner <equinox@spreadspace.org>2019-09-28 02:12:51 +0200
commit28b5ce50719d0775ddaaee905d78fef6dbbf7d3f (patch)
tree0d7ab48d395ba73ff050959f774f4cc9314c406a /roles/kubernetes/base/tasks/main.yml
parentsome more cleanup of apt-repos (diff)
no more apt_key and apt_repository module
Diffstat (limited to 'roles/kubernetes/base/tasks/main.yml')
-rw-r--r--roles/kubernetes/base/tasks/main.yml24
1 files changed, 14 insertions, 10 deletions
diff --git a/roles/kubernetes/base/tasks/main.yml b/roles/kubernetes/base/tasks/main.yml
index c873fc52..bf62f7d2 100644
--- a/roles/kubernetes/base/tasks/main.yml
+++ b/roles/kubernetes/base/tasks/main.yml
@@ -25,18 +25,22 @@
apt:
name: apt-transport-https
state: present
- force: yes
-- name: add kubernetes apt key
- apt_key:
- data: "{{ lookup('file', 'kubernetes-apt-key.asc') }}"
- state: present
+- name: add repository key
+ copy:
+ src: apt-key.gpg
+ dest: /etc/apt/trusted.gpg.d/kubernetes.gpg
+ notify: update apt cache
-- name: add kubernetes apt repo
- apt_repository:
- repo: deb http://apt.kubernetes.io/ kubernetes-xenial main
- state: present
- filename: kubernetes
+- name: add repository entry
+ copy:
+ content: |
+ deb http://apt.kubernetes.io/ kubernetes-xenial main
+ dest: /etc/apt/sources.list.d/kubernetes.list
+ notify: update apt cache
+
+- name: update apt cache
+ meta: flush_handlers
- name: install basic kubernetes components
apt: