If you are using GitLab outside of the ILL, then you will need to use HTTPS and not SSH for clone/push/pull operations. SSH will work normally if you are using the VPN.

Commit 03dba7f9 authored by eric pellegrini's avatar eric pellegrini

refactored master-nodes role

parent 2d9ddfa2
---
- hosts: k8s_masters
remote_user: "{{ vm_admin }}"
become: True
remote_user: "{{ cluster_users.1.name }}"
environment: "{{ proxy_settings }}"
......@@ -12,7 +10,5 @@
- import_role:
name: roles/master-nodes
vars:
kubernetes_admin: "{{ kubernetes_parameters['admin'] }}"
kubernetes_admin_group: "{{ kubernetes_parameters['admin_group'] }}"
kubernetes_pods_cidr: "{{ kubernetes_parameters['pods_cidr'] }}"
kubernetes_pods_network_config: "{{ kubernetes_parameters['pods_network_config'] }}"
pods_cidr: "{{ kubernetes.pods_cidr }}"
pods_network_config: "{{ kubernetes.pods_network_config }}"
......@@ -16,7 +16,6 @@
path: /etc/kubernetes/admin.conf
state: file
mode: "644"
become_user: root
become: True
- name: copy default kubernetes configuration file to ~/.kube
......@@ -25,22 +24,17 @@
dest: "~/.kube/config"
remote_src: True
force: True
owner: "{{ kubernetes_admin }}"
group: "{{ kubernetes_admin_group }}"
- name: chmod the /etc/kubernetes/admin.conf back to 600
file:
path: /etc/kubernetes/admin.conf
state: file
mode: "600"
become_user: root
become: True
- name: change ownership of ~/.kube/config
file:
path: "~/.kube/config"
owner: "{{ kubernetes_admin }}"
group: "{{ kubernetes_admin_group }}"
- name: copy the kubernetes config file local file
fetch:
......@@ -49,7 +43,7 @@
flat: True
- name: install cni provider for pod network
command: "kubectl apply -f {{ kubernetes_pods_network_config }}"
command: "kubectl apply -f {{ pods_network_config }}"
- name: wait for the master node to be ready
command: "kubectl wait --for=condition=Ready --timeout=60s nodes/{{ ansible_hostname }}"
......
......@@ -9,4 +9,4 @@
state: absent
- name: (re)initialize the kubernetes cluster
command: "kubeadm init --pod-network-cidr={{ kubernetes_pods_cidr }}"
command: "kubeadm init --pod-network-cidr={{ pods_cidr }}"
---
# tasks file for roles/master-nodes
- import_tasks: control-plane.yml
become: True
- import_tasks: configure.yml
become_user: "{{ kubernetes_admin }}"
become: True
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment