Compare commits

..

No commits in common. "9d15c4fcb0006a9c98171de3668a53cd1baeb3d4" and "b2ed0c9d29a208a94c45c1d5cd1365275b18311d" have entirely different histories.

7 changed files with 59 additions and 129 deletions

View file

@ -1,9 +1,3 @@
## 0.2.0a3 (2025-02-17)
### Fix
- translation
## 0.2.0a2 (2025-02-10)
### Feat

View file

@ -5,8 +5,8 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: 2025-02-15 12:43+0100\n"
"PO-Revision-Date: 2025-02-15 12:44+0100\n"
"POT-Creation-Date: 2024-11-01 11:03+0100\n"
"PO-Revision-Date: 2024-11-01 11:04+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr\n"
@ -16,80 +16,42 @@ msgstr ""
"Generated-By: pygettext.py 1.5\n"
"X-Generator: Poedit 3.5\n"
#: src/rougail/output_ansible/__init__.py:57
msgid "no namespace configured"
msgstr "aucun espace de nom configuré"
#: src/rougail/output_exporter/__init__.py:73
msgid "The following variables are mandatory but have no value:"
msgstr "Les variables suivantes sont obligatoire mais n'ont pas de valeur :"
#: src/rougail/output_ansible/__init__.py:65
msgid "cannot find host namespace \"{0}\""
msgstr "ne peut trouve l'espace de nom de l'hôte \"{0}\""
#: src/rougail/output_exporter/__init__.py:84
msgid "The following variables are inaccessible but are empty and mandatory :"
msgstr "Les variables suiveuses sont inaccessibles mais sont vides et obligatoires :"
#: src/rougail/output_ansible/__init__.py:70
#, fuzzy
msgid "malformated host namespace \"{0}\", should have the \"hostnames\" key"
msgstr ""
"l'espace de nom de l'hôte \"{0}\" est mal formaté, devrait avoir la clé "
"\"hostnames\""
#: src/rougail/output_exporter/output/console.py:53
msgid "Undocumented variable"
msgstr "Variable non documentée"
#: src/rougail/output_ansible/__init__.py:97
msgid "cannot find \"hostnames\" in \"{0}\" namespace"
msgstr "ne peut trouve \"hostnames\" dans l'espace de nom \"{0}\""
#: src/rougail/output_exporter/output/console.py:54
msgid "Undocumented but modified variable"
msgstr "Variable non documentée mais modifiée"
#: src/rougail/output_ansible/config.py:29
#: src/rougail/output_ansible/config.py:30
msgid "parameter added only to be compatible with Ansible"
msgstr "paramètre ajouté seulement pour être compatible avec Ansible"
#: src/rougail/output_exporter/output/console.py:57
msgid "Unmodifiable variable"
msgstr "Variable non modifiable"
#: src/rougail/output_ansible/config.py:52
msgid "Configuration of user data or output Ansible"
msgstr "Configuration de Ansible comme donnée utilisateur ou sortie"
#: src/rougail/output_exporter/output/console.py:61
msgid "Default value"
msgstr "Valeur par défaut"
#: src/rougail/output_ansible/config.py:62
msgid "Configuration of output Ansible"
msgstr "Configuration de la sortie Ansible"
#: src/rougail/output_exporter/output/console.py:62
msgid "Modified value"
msgstr "Valeur modifiée"
#: src/rougail/output_ansible/config.py:72
msgid "Namespace with host values"
msgstr "Espace de nom avec les valeurs de l'hôte"
#: src/rougail/output_exporter/output/console.py:63
msgid "Original default value"
msgstr "Valeur par défaut d'origine"
#: src/rougail/output_ansible/config.py:76
msgid "Only variables in host namespace is available by a host"
msgstr ""
"Seules les variables de l'espace de nom de l'hôte est valable pour un hôte"
#: src/rougail/output_exporter/output/console.py:67
msgid "Caption"
msgstr "Légende"
#: src/rougail/output_ansible/config.py:77
msgid "All variables is available for all hosts"
msgstr "Tous les variables sont valables pour tous les hôtes"
#~ msgid "The following variables are mandatory but have no value:"
#~ msgstr "Les variables suivantes sont obligatoire mais n'ont pas de valeur :"
#~ msgid ""
#~ "The following variables are inaccessible but are empty and mandatory :"
#~ msgstr ""
#~ "Les variables suiveuses sont inaccessibles mais sont vides et "
#~ "obligatoires :"
#~ msgid "Undocumented variable"
#~ msgstr "Variable non documentée"
#~ msgid "Undocumented but modified variable"
#~ msgstr "Variable non documentée mais modifiée"
#~ msgid "Unmodifiable variable"
#~ msgstr "Variable non modifiable"
#~ msgid "Default value"
#~ msgstr "Valeur par défaut"
#~ msgid "Modified value"
#~ msgstr "Valeur modifiée"
#~ msgid "Original default value"
#~ msgstr "Valeur par défaut d'origine"
#~ msgid "Caption"
#~ msgstr "Légende"
#~ msgid "Variables:"
#~ msgstr "Variables :"
#: src/rougail/output_exporter/output/console.py:92
msgid "Variables:"
msgstr "Variables :"

View file

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2025-02-15 12:44+0100\n"
"POT-Creation-Date: 2024-12-29 10:03+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -15,44 +15,19 @@ msgstr ""
"Generated-By: pygettext.py 1.5\n"
#: src/rougail/output_ansible/__init__.py:57
#: src/rougail/output_ansible/__init__.py:55
msgid "no namespace configured"
msgstr ""
#: src/rougail/output_ansible/__init__.py:65
msgid "cannot find host namespace \"{0}\""
#: src/rougail/output_ansible/__init__.py:63
msgid "cannot find hosts namespace \"{0}\""
msgstr ""
#: src/rougail/output_ansible/__init__.py:70
msgid "malformated host namespace \"{0}\", should have the \"hostnames\" key"
#: src/rougail/output_ansible/__init__.py:68
msgid "malformated hosts namespace \"{0}\", should has \"hostnames\""
msgstr ""
#: src/rougail/output_ansible/__init__.py:97
#: src/rougail/output_ansible/__init__.py:95
msgid "cannot find \"hostnames\" in \"{0}\" namespace"
msgstr ""
#: src/rougail/output_ansible/config.py:29
#: src/rougail/output_ansible/config.py:30
msgid "parameter added only to be compatible with Ansible"
msgstr ""
#: src/rougail/output_ansible/config.py:52
msgid "Configuration of user data or output Ansible"
msgstr ""
#: src/rougail/output_ansible/config.py:62
msgid "Configuration of output Ansible"
msgstr ""
#: src/rougail/output_ansible/config.py:72
msgid "Namespace with host values"
msgstr ""
#: src/rougail/output_ansible/config.py:76
msgid "Only variables in host namespace is available by a host"
msgstr ""
#: src/rougail/output_ansible/config.py:77
msgid "All variables is available for all hosts"
msgstr ""

View file

@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
[project]
name = "rougail.output_ansible"
version = "0.2.0a3"
version = "0.2.0a2"
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
readme = "README.md"
description = "Rougail output ansible"

View file

@ -62,12 +62,12 @@ class RougailOutputAnsible(RougailOutputJson):
except AttributeError:
hosts_config = None
if not hosts_config:
self.errors.append(_('cannot find host namespace "{0}"').format(self.host_namespace))
self.errors.append(_('cannot find hosts namespace "{0}"').format(self.host_namespace))
else:
try:
hosts_config.option('hostnames').name()
except AttributeError:
self.errors.append(_('malformated host namespace "{0}", should have the "hostnames" key').format(self.host_namespace))
self.errors.append(_('malformated hosts namespace "{0}", should has "hostnames"').format(self.host_namespace))
return super().manage_errors()
return True

View file

@ -16,7 +16,6 @@ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
from .i18n import _
from pathlib import Path
@ -24,57 +23,57 @@ def get_rougail_config(
*,
backward_compatibility=True,
) -> dict:
options = [f"""
options = ["""
list:
description: {_('parameter added only to be compatible with Ansible')}
negative_description: {_('parameter added only to be compatible with Ansible')}
description: parameter added only to be compatible with Ansible
negative_description: parameter added only to be compatible with Ansible
default: false
disabled:
type: jinja
jinja: |
{{% if step.output != 'ansible' %}}
{% if step.output != 'ansible' %}
disabled
{{% endif %}}
{% endif %}
json:
redefine: true
disabled:
type: jinja
jinja: |
{{% if step.output != 'json' and step.output != 'ansible' %}}
{% if step.output != 'json' and step.output != 'ansible' %}
disabled
{{% endif %}}
{% endif %}
""", f"""
""", """
ansible:
exists: true
redefine: true
description: {_('Configuration of user data or output Ansible')}
description: Configuration of user data or output Ansible
disabled:
type: jinja
jinja: |
{{% if step.output != 'ansible' and 'ansible' not in step.user_data %}}
{% if step.output != 'ansible' and 'ansible' not in step.user_data %}
disabled
{{% endif %}}
{% endif %}
""", f"""
""", """
ansible:
description: {_('Configuration of output Ansible')}
description: Configuration of output Ansible
exists: false
disabled:
variable: step.output
when_not: ansible
""", f"""
""", """
ansible:
host_namespace:
description: {_('Namespace with host values')}
description: Namespace with host values
default: "hosts"
namespace_is_hostname:
description: {_('Only variables in host namespace is available by a host')}
negative_description: {_('All variables is available for all hosts')}
description: Only variables in hostname namespace is available by a host
negative_description: All variables is available for all hosts
default: false
"""]
return {