diff --git a/locale/fr/LC_MESSAGES/user_data_ansible.po b/locale/fr/LC_MESSAGES/user_data_ansible.po index 746fc99..7d9ed13 100644 --- a/locale/fr/LC_MESSAGES/user_data_ansible.po +++ b/locale/fr/LC_MESSAGES/user_data_ansible.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2024-11-27 16:19+0100\n" -"PO-Revision-Date: 2024-11-27 16:21+0100\n" +"POT-Creation-Date: 2025-02-10 09:15+0100\n" +"PO-Revision-Date: 2025-02-10 09:15+0100\n" "Last-Translator: \n" "Language-Team: \n" "Language: fr\n" @@ -16,6 +16,24 @@ msgstr "" "Generated-By: pygettext.py 1.5\n" "X-Generator: Poedit 3.5\n" -#: src/rougail/user_data_ansible/__init__.py:46 +#: src/rougail/user_data_ansible/__init__.py:47 msgid "ansible is not set in step.user_data" msgstr "ansible n'est pas définit dans step.user_data" + +#: src/rougail/user_data_ansible/config.py:30 +msgid "Configuration of user data Ansible" +msgstr "Configuration des données utilisateurs Ansible" + +#: src/rougail/user_data_ansible/config.py:39 +msgid "Ansible filename inventory" +msgstr "Nom du fichier d'inventaire Ansible" + +#: src/rougail/user_data_ansible/config.py:55 +msgid "Secret to decrypt file" +msgstr "Secret pour déchiffrer le fichier" + +#: src/rougail/user_data_ansible/config.py:65 +#, fuzzy +#| msgid "Ansible file that may contain passwords" +msgid "Ansible file that may contain secrets" +msgstr "Fichier Ansible qui peuvent contenir des secrets" diff --git a/locale/user_data_ansible.pot b/locale/user_data_ansible.pot index af651fe..9771974 100644 --- a/locale/user_data_ansible.pot +++ b/locale/user_data_ansible.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2024-11-27 16:21+0100\n" +"POT-Creation-Date: 2025-02-10 09:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -15,7 +15,23 @@ msgstr "" "Generated-By: pygettext.py 1.5\n" -#: src/rougail/user_data_ansible/__init__.py:46 +#: src/rougail/user_data_ansible/__init__.py:47 msgid "ansible is not set in step.user_data" msgstr "" +#: src/rougail/user_data_ansible/config.py:30 +msgid "Configuration of user data Ansible" +msgstr "" + +#: src/rougail/user_data_ansible/config.py:39 +msgid "Ansible filename inventory" +msgstr "" + +#: src/rougail/user_data_ansible/config.py:55 +msgid "Secret to decrypt file" +msgstr "" + +#: src/rougail/user_data_ansible/config.py:65 +msgid "Ansible file that may contain secrets" +msgstr "" + diff --git a/src/rougail/user_data_ansible/__init__.py b/src/rougail/user_data_ansible/__init__.py index cdd9e81..3633cfe 100644 --- a/src/rougail/user_data_ansible/__init__.py +++ b/src/rougail/user_data_ansible/__init__.py @@ -1,6 +1,6 @@ """ Silique (https://www.silique.fr) -Copyright (C) 2024 +Copyright (C) 2024-2025 This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the @@ -48,6 +48,7 @@ class RougailUserDataAnsible(RougailUserDataYaml): self.rougailconfig = rougailconfig self.filenames = self.rougailconfig["ansible.filename"] self.secret = self.rougailconfig["ansible.secret"] + self.file_with_secrets = self.rougailconfig["ansible.file_with_secrets"] self.config = config self.errors = [] self.warnings = [] diff --git a/src/rougail/user_data_ansible/config.py b/src/rougail/user_data_ansible/config.py index 5a8f818..d73b420 100644 --- a/src/rougail/user_data_ansible/config.py +++ b/src/rougail/user_data_ansible/config.py @@ -1,6 +1,6 @@ """ Silique (https://www.silique.fr) -Copyright (C) 2024 +Copyright (C) 2024-2025 This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the @@ -15,6 +15,7 @@ details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . """ +from .i18n import _ def get_rougail_config( @@ -24,18 +25,18 @@ def get_rougail_config( """get rougail config for ansible""" # redefine ansible family if already exists (for output) # or create a new only only for user data - options = """ + options = f""" ansible: - description: Configuration of user data Ansible + description: {_("Configuration of user data Ansible")} disabled: type: jinja jinja: | - {% if 'ansible' not in step.user_data %} + {{% if 'ansible' not in step.user_data %}} disabled - {% endif %} + {{% endif %}} filename: - description: Ansible filename inventory + description: {_("Ansible filename inventory")} type: unix_filename multi: true params: @@ -46,19 +47,28 @@ ansible: disabled: type: jinja jinja: | - {% if 'ansible' not in step.user_data %} + {{% if 'ansible' not in step.user_data %}} disabled - {% endif %} + {{% endif %}} secret: - description: Secret to decrypt file + description: {_("Secret to decrypt file")} type: secret disabled: type: jinja jinja: | - {% if 'ansible' not in step.user_data %} + {{% if 'ansible' not in step.user_data %}} disabled - {% endif %} + {{% endif %}} + + file_with_secrets: + description: {_("Ansible file that may contain secrets")} + default: all + choices: + - all + - first + - last + - none """ return { "name": "ansible", diff --git a/src/rougail/user_data_ansible/i18n.py b/src/rougail/user_data_ansible/i18n.py index 605ae65..c0b944d 100644 --- a/src/rougail/user_data_ansible/i18n.py +++ b/src/rougail/user_data_ansible/i18n.py @@ -1,6 +1,6 @@ """Internationalisation utilities Silique (https://www.silique.fr) -Copyright (C) 2024 +Copyright (C) 2024-2025 This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the diff --git a/src/rougail/user_data_ansible/locale/fr/LC_MESSAGES/user_data_ansible.mo b/src/rougail/user_data_ansible/locale/fr/LC_MESSAGES/user_data_ansible.mo index 8a10f34..99b33b5 100644 Binary files a/src/rougail/user_data_ansible/locale/fr/LC_MESSAGES/user_data_ansible.mo and b/src/rougail/user_data_ansible/locale/fr/LC_MESSAGES/user_data_ansible.mo differ