From 50cb7d252579d4f3aab1ba606a46fb631f34ba81 Mon Sep 17 00:00:00 2001 From: jaydee Date: Wed, 25 Feb 2026 14:18:31 +0100 Subject: [PATCH] klal --- roles/cloud_init/handlers/main.yml | 6 ++++-- roles/cloud_init/templates/99-custom.cfg.j2 | 6 ++++++ roles/kubernetes/tasks/Ubuntu.yml | 7 +++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/roles/cloud_init/handlers/main.yml b/roles/cloud_init/handlers/main.yml index 3de4ea7..965b201 100644 --- a/roles/cloud_init/handlers/main.yml +++ b/roles/cloud_init/handlers/main.yml @@ -1,3 +1,5 @@ -#SPDX-License-Identifier: MIT-0 --- -# handlers file for cloud_init +- name: Restart cloud-init + ansible.builtin.systemd: + name: "{{ cloud_init_service }}" + state: restarted \ No newline at end of file diff --git a/roles/cloud_init/templates/99-custom.cfg.j2 b/roles/cloud_init/templates/99-custom.cfg.j2 index e69de29..3cfafc6 100644 --- a/roles/cloud_init/templates/99-custom.cfg.j2 +++ b/roles/cloud_init/templates/99-custom.cfg.j2 @@ -0,0 +1,6 @@ +# Ansible managed + +system_info: + default_user: + name: {{ cloud_init_default_user }} + lock_passwd: {{ cloud_init_lock_passwd }} \ No newline at end of file diff --git a/roles/kubernetes/tasks/Ubuntu.yml b/roles/kubernetes/tasks/Ubuntu.yml index 266501f..59ead9b 100644 --- a/roles/kubernetes/tasks/Ubuntu.yml +++ b/roles/kubernetes/tasks/Ubuntu.yml @@ -1,6 +1,13 @@ - name: Install Kubernetes on Ubuntu 24 become: "{{ 'no' if inventory_hostname == 'nas.home.lan' else 'yes' }}" block: + - name: Create apt proxy file + ansible.builtin.copy: + dest: /etc/apt/apt.conf.d/02proxy + content: | + Acquire::http::Proxy "http://192.168.77.101:3142"; + Acquire::https::Proxy "false"; + - name: Remove multiple files file: path: "{{ item }}"