Fixes #3: Fix linting issues, add ansible-lint and yamllint configuration.

This commit is contained in:
Jeff Geerling
2020-05-12 15:17:06 -05:00
parent bad25d1ba5
commit e47af78bfd
9 changed files with 86 additions and 46 deletions

View File

@@ -36,10 +36,10 @@
register: node_token
- name: Store Master node-token
set_fact:
token: "{{ node_token.content | b64decode | regex_replace('\n', '') }}"
set_fact:
token: "{{ node_token.content | b64decode | regex_replace('\n', '') }}"
- name: Restore node-token file access
- name: Restore node-token file access
file:
path: /var/lib/rancher/k3s/server
mode: "{{ p.stat.mode }}"
@@ -58,9 +58,11 @@
owner: "{{ ansible_user }}"
- name: Replace https://localhost:6443 by https://master-pi:6443
command: k3s kubectl config set-cluster default
--server=https://{{ master_ip }}:6443
--kubeconfig ~{{ ansible_user }}/.kube/config
command: >-
k3s kubectl config set-cluster default
--server=https://{{ master_ip }}:6443
--kubeconfig ~{{ ansible_user }}/.kube/config
changed_when: true
- name: Create kubectl symlink
file: