From e73c49dc5e6c79299df46bc5ffd28c4525a850fc Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Mon, 17 Jul 2023 11:31:21 +0200 Subject: [PATCH] refactor: fix ansible-lint complains MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change task names to start with a capital letter for consistency - Update file modes to be strings instead of integers for better readability - Replace deprecated `fetch` module with `ansible.builtin.fetch` 🤖 --- pb_install.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pb_install.yml b/pb_install.yml index abd71a1..64c3574 100644 --- a/pb_install.yml +++ b/pb_install.yml @@ -1,43 +1,43 @@ --- - hosts: all gather_facts: false - name: install k3s server + name: Install k3s server tags: k3s-server tasks: - - name: download k3s install script + - name: Download k3s install script ansible.builtin.get_url: url: https://get.k3s.io dest: /usr/local/bin/k3s_install.sh - mode: 0755 - - name: install k3s server + mode: "755" + - name: Install k3s server ansible.builtin.command: "k3s_install.sh" environment: INSTALL_K3S_CHANNEL: v1.27.3+k3s1 INSTALL_K3S_EXEC: "--disable traefik" changed_when: false - - name: start and enable k3s server + - name: Start and enable k3s server ansible.builtin.service: name: k3s state: started enabled: true - - name: add kubeconfig variable to bashrc + - name: Add kubeconfig variable to bashrc ansible.builtin.lineinfile: path: ~/.bashrc line: "export KUBECONFIG=/etc/rancher/k3s/k3s.yaml" insertafter: EOF - - name: get kubeconfig - fetch: + - name: Get kubeconfig + ansible.builtin.fetch: src: /etc/rancher/k3s/k3s.yaml dest: kubeconfig_{{ ansible_host }}.yml flat: true - hosts: all gather_facts: false - name: deploy baseline + name: Deploy baseline tags: baseline tasks: - - name: copy manifest + - name: Copy manifest ansible.builtin.copy: src: argocd-init.yml dest: /var/lib/rancher/k3s/server/manifests/argocd-init.yml - mode: 0644 + mode: "644"