From d298c8ac974bf6390edaf39beff21a12b3178416 Mon Sep 17 00:00:00 2001 From: rubenb Date: Fri, 27 Oct 2023 13:03:49 +0200 Subject: [PATCH] test community.general modules --- roles/config-base-debian-os/tasks/main.yaml | 74 +++++++++++++-------- 1 file changed, 45 insertions(+), 29 deletions(-) diff --git a/roles/config-base-debian-os/tasks/main.yaml b/roles/config-base-debian-os/tasks/main.yaml index 9e0f10a..cb64f1b 100644 --- a/roles/config-base-debian-os/tasks/main.yaml +++ b/roles/config-base-debian-os/tasks/main.yaml @@ -1,33 +1,5 @@ --- -#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -# Reconfigure locales - enable en_US-UTF8 and es_ES-UTF8 -- name: reconfigure locales enable en_US-UTF8 and es_ES-UTF8 - debconf: - name: locales - question: locales/default_environment_locale - value: en_US-UTF8, es_ES-UTF8 - vtype: multiselect -#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -# Reconfigure timezone - Europe/Madrid -- name: reconfigure timezone Europe/Madrid - debconf: - name: tzdata - question: "{{ item.question }}" - value: "{{ item.value }}" - vtype: select - with_items: - - question: "tzdata/Zones/Europe" - value: "Madrid" - - question: "tzdata/Areas" - value: "Europe" - - question: "tzdata/Zones/Etc" - value: "UTC" - notify: update timezone -#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # update packages - name: update packages @@ -49,7 +21,7 @@ #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # install packages -- name: install some packages (vim htop psmisc aptitude) +- name: install some packages apt: name: "{{ item }}" state: present @@ -66,6 +38,50 @@ - rsyslog # - iptables - mlocate + - task-spanish + - locales-all +#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +# DONT WORK BECAUSE THIS TASK ONLY CONFIGURE DEB PACKAGE , it needs to apply reconfigure , but dont works :( +# Reconfigure locales - enable en_US-UTF8 and es_ES-UTF8 +#- name: reconfigure locales enable en_US-UTF8 and es_ES-UTF8 +# debconf: +# name: locales +# question: locales/default_environment_locale +# value: en_US-UTF8, es_ES-UTF8 +# vtype: multiselect +#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +# !!! WE NEED ANSIBLE COLLECTIONS community.general to use this module 'locale_gen' +- name: reconfigure locales enable es_ES.UTF-8 + locale_gen: + name: es_ES.UTF-8 + state: present +#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +# DONT WORK BECAUSE THIS TASK ONLY CONFIGURE DEB PACKAGE , it needs to apply reconfigure , but dont works :( +# Reconfigure timezone - Europe/Madrid +#- name: reconfigure timezone Europe/Madrid +# debconf: +# name: tzdata +# question: "{{ item.question }}" +# value: "{{ item.value }}" +# vtype: select +# with_items: +# - question: "tzdata/Zones/Europe" +# value: "Madrid" +# - question: "tzdata/Areas" +# value: "Europe" +# - question: "tzdata/Zones/Etc" +# value: "UTC" +# notify: update timezone +#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +# !!! WE NEED ANSIBLE COLLECTIONS community.general to use this module 'timezone' +- name: reconfigure timezone to Europe/Madrid + timezone: + hwclock: "UTC" + name: "Europe/Madrid" #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++