blob: d3da11324b4244f18d8f559e6f9749ee2932d6b6 [file] [log] [blame]
Mohammed Naser336caf42022-03-11 17:56:45 -05001# Copyright (c) 2022 VEXXHOST, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
Tadas Sutkaitis4ace4182023-02-27 04:31:52 +020015- name: Add apt key
Mohammed Naser336caf42022-03-11 17:56:45 -050016 ansible.builtin.apt_key:
17 url: "{{ helm_repository_apt_key }}"
18 state: present
19
Tadas Sutkaitis4ace4182023-02-27 04:31:52 +020020- name: Configure version pinning
Mohammed Naser336caf42022-03-11 17:56:45 -050021 ansible.builtin.template:
22 src: apt-preferences.j2
23 dest: /etc/apt/preferences.d/helm
Tadas Sutkaitis4ace4182023-02-27 04:31:52 +020024 mode: "0644"
Mohammed Naser336caf42022-03-11 17:56:45 -050025
26- name: Add package repository
27 ansible.builtin.apt_repository:
28 repo: "deb {{ helm_repository_url }} all main"
29 state: present
30
31- name: Install packages
32 ansible.builtin.apt:
ricolin09e22882022-08-04 12:21:58 +080033 name: ["git", "helm"]
Mohammed Naser336caf42022-03-11 17:56:45 -050034 install_recommends: false
Michiel Piscaere682a3c2022-06-16 09:36:26 +000035
Tadas Sutkaitis4ace4182023-02-27 04:31:52 +020036- name: Add bash autocomplete for helm
Michiel Piscaere682a3c2022-06-16 09:36:26 +000037 ansible.builtin.lineinfile:
38 path: /root/.bashrc
39 line: 'source <(helm completion bash)'
40 insertbefore: EOF