From 22acb378af6b074c367f1803d20a848d7233560c Mon Sep 17 00:00:00 2001 From: smolkik_adm Date: Mon, 4 May 2026 08:24:29 +0000 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20FixRepositories24.10.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FixRepositories24.10.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 FixRepositories24.10.yml diff --git a/FixRepositories24.10.yml b/FixRepositories24.10.yml new file mode 100644 index 0000000..8a2ede1 --- /dev/null +++ b/FixRepositories24.10.yml @@ -0,0 +1,23 @@ +- name: Fix EOL repositories for Ubuntu Oracular (24.10) + hosts: wg + become: true + tasks: + - name: Replace archive.ubuntu.com with old-releases.ubuntu.com + ansible.builtin.replace: + path: /etc/apt/sources.list + regexp: 'http://(?:archive|security).ubuntu.com/ubuntu' + replace: 'http://old-releases.ubuntu.com/ubuntu' + notify: Update apt cache + + - name: Fix sources.list.d entries if present + ansible.builtin.shell: | + find /etc/apt/sources.list.d -name '*.list' -exec sed -i \ + 's|http://\(archive\|security\).ubuntu.com/ubuntu|http://old-releases.ubuntu.com/ubuntu|g' {} \; + changed_when: true + + handlers: + - name: Update apt cache + ansible.builtin.apt: + update_cache: yes + cache_valid_time: 3600 + ignore_errors: true # Если old-releases временно недоступен \ No newline at end of file