From 01e607bcbbca399672d3865deab9d58f48133906 Mon Sep 17 00:00:00 2001 From: Ibrahim Mkusa Date: Thu, 14 Nov 2024 14:21:48 -0500 Subject: [PATCH] helm v.0.0.1 playbook --- ansible.cfg | 3 +++ inventory/inventory | 3 +-- playbooks/docker/install.yml | 2 +- playbooks/helm/install_helm_apt.yaml | 20 ++++++++++++++++++++ 4 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 playbooks/helm/install_helm_apt.yaml diff --git a/ansible.cfg b/ansible.cfg index 3b5da2d..92ba8fa 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -3,3 +3,6 @@ inventory=./inventory remote_user="ansible" roles_path=./roles collections_path=./collections + +[inventory] +enable_plugins = community.general.proxmox, yaml diff --git a/inventory/inventory b/inventory/inventory index d9caafa..fc10146 100644 --- a/inventory/inventory +++ b/inventory/inventory @@ -11,8 +11,7 @@ localhost aws ansible_user=ubuntu [helm] -192.168.1.233 ansible_user=ansible -192.168.1.237 ansible_user=ansible +node1 ansible_user=ansible [dhcp] 192.168.2.191 diff --git a/playbooks/docker/install.yml b/playbooks/docker/install.yml index 01d11e8..4615187 100644 --- a/playbooks/docker/install.yml +++ b/playbooks/docker/install.yml @@ -1,6 +1,6 @@ --- - name: installs docker on machine using jeffs geerling role - hosts: docker + hosts: localhost become: true roles: - geerlingguy.docker diff --git a/playbooks/helm/install_helm_apt.yaml b/playbooks/helm/install_helm_apt.yaml new file mode 100644 index 0000000..05e6fff --- /dev/null +++ b/playbooks/helm/install_helm_apt.yaml @@ -0,0 +1,20 @@ +--- +- name: installs helm repo and its repository on ubuntu + hosts: helm + become: true + tasks: + - name: install needed dependencies via apt + ansible.builtin.apt: + pkg: + - curl + - apt-transport-https + + - name: install repository and key (not idempotent) + ansible.builtin.shell: | + curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list + apt update + + - name: install helm kubernetes package manager + ansible.builtin.apt: + name: helm