Skip to content

Instantly share code, notes, and snippets.

@HauptJ
Created September 29, 2025 19:52
Show Gist options
  • Select an option

  • Save HauptJ/206d82ec74ea935fd68c0a7140aa93e7 to your computer and use it in GitHub Desktop.

Select an option

Save HauptJ/206d82ec74ea935fd68c0a7140aa93e7 to your computer and use it in GitHub Desktop.

Revisions

  1. HauptJ created this gist Sep 29, 2025.
    22 changes: 22 additions & 0 deletions kubectl.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    #!/usr/bin/env ansible-playbook
    ---
    - name: Install Kubectl
    hosts: localhost
    become: true
    gather_facts: false

    tasks:
    - name: Configure YUM repo
    yum_repository:
    name: kubernetes
    description: kubernetes yum repo
    baseurl: https://pkgs.k8s.io/core:/stable:/v1.34/rpm/
    gpgkey: https://pkgs.k8s.io/core:/stable:/v1.34/rpm/repodata/repomd.xml.key
    gpgcheck: true
    enabled: true

    - name: Install Kubectl
    dnf:
    name:
    - kubectl
    state: latest