Skip to content

Commit

Permalink
enable kubeadm init verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
gtirloni committed Jul 29, 2024
1 parent ec269b0 commit 1f6fdb3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
- name: Run Molecule
run: molecule test -s ${{ matrix.scenario }}
env:
MOLECULE_VERBOSITY: 1
MOLECULE_DISTRO: ${{ matrix.distro }}

kubernetes:
Expand Down
10 changes: 9 additions & 1 deletion roles/kubernetes/tasks/bootstrap-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,21 @@
- name: Initialize cluster
throttle: 1
ansible.builtin.shell: |
kubeadm init --config /etc/kubernetes/kubeadm.yaml --upload-certs \
kubeadm init --v=5 --config /etc/kubernetes/kubeadm.yaml --upload-certs \
--ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests{% if kubernetes_allow_unsafe_swap %},Swap{% endif %}
args:
creates: /etc/kubernetes/admin.conf
environment:
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
when: inventory_hostname == kubernetes_bootstrap_node
failed_when: false

- name: debug logs

Check failure on line 113 in roles/kubernetes/tasks/bootstrap-cluster.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

name[casing]

All names should start with an uppercase letter.

Check failure on line 113 in roles/kubernetes/tasks/bootstrap-cluster.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

no-changed-when

Commands should not change things if nothing needs doing.
ansible.builtin.shell: |
PAGER= ip addr
PAGER= journalctl -u kubelet
PAGER= journalctl -u containerd
failed_when: true

- name: Check if the node is already part of the cluster
ansible.builtin.stat:
Expand Down

0 comments on commit 1f6fdb3

Please sign in to comment.