Compare commits

..

No commits in common. "13528fb4af9170f2ce89d247eedf28193ac6a7b9" and "03af28c8359facf0a0c243f9625c5a2d49b5426a" have entirely different histories.

8 changed files with 19 additions and 70 deletions

View file

@ -1,9 +1,3 @@
## 0.1.0a0 (2025-02-10)
### Feat
- add new parameter ansible.file_with_secrets
## 0.0.1a4 (2025-01-02)
### Fix

View file

@ -5,8 +5,8 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: 2025-02-10 09:15+0100\n"
"PO-Revision-Date: 2025-02-10 09:15+0100\n"
"POT-Creation-Date: 2024-11-27 16:19+0100\n"
"PO-Revision-Date: 2024-11-27 16:21+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr\n"
@ -16,24 +16,6 @@ msgstr ""
"Generated-By: pygettext.py 1.5\n"
"X-Generator: Poedit 3.5\n"
#: src/rougail/user_data_ansible/__init__.py:47
#: src/rougail/user_data_ansible/__init__.py:46
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"

View file

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2025-02-10 09:16+0100\n"
"POT-Creation-Date: 2024-11-27 16:21+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,23 +15,7 @@ msgstr ""
"Generated-By: pygettext.py 1.5\n"
#: src/rougail/user_data_ansible/__init__.py:47
#: src/rougail/user_data_ansible/__init__.py:46
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 ""

View file

@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
[project]
name = "rougail.user_data_ansible"
version = "0.1.0a0"
version = "0.0.1a4"
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
readme = "README.md"
description = "Rougail user_data ansible"

View file

@ -1,6 +1,6 @@
"""
Silique (https://www.silique.fr)
Copyright (C) 2024-2025
Copyright (C) 2024
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,7 +48,6 @@ 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 = []

View file

@ -1,6 +1,6 @@
"""
Silique (https://www.silique.fr)
Copyright (C) 2024-2025
Copyright (C) 2024
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,7 +15,6 @@ details.
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 _
def get_rougail_config(
@ -25,18 +24,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 = f"""
options = """
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:
@ -47,28 +46,19 @@ 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 %}}
file_with_secrets:
description: {_("Ansible file that may contain secrets")}
default: all
choices:
- all
- first
- last
- none
{% endif %}
"""
return {
"name": "ansible",

View file

@ -1,6 +1,6 @@
"""Internationalisation utilities
Silique (https://www.silique.fr)
Copyright (C) 2024-2025
Copyright (C) 2024
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