Compare commits

..

4 commits

5 changed files with 19 additions and 75 deletions

View file

@ -1,81 +1,23 @@
## 0.1.0a7 (2026-06-11)
### Fix
- add test
## 0.1.0a6 (2026-05-04)
## 1.0.0 (2026-06-21)
### Feat
- multi layers
### Fix
- user-data-ansible can set a personalise source
## 0.1.0a5 (2025-11-21)
### Fix
- ExtentionError => ExtensionError
## 0.1.0a4 (2025-11-06)
### Fix
- disable config if ansible is not selected
## 0.1.0a3 (2025-05-02)
### Fix
- do not force use_data usage
## 0.1.0a2 (2025-04-09)
### Fix
- version
## 0.1.0a1 (2025-03-30)
### Fix
- i18n
## 0.1.0a0 (2025-02-10)
### Feat
- add new parameter ansible.file_with_secrets
## 0.0.1a4 (2025-01-02)
### Fix
- rougail dependencies
- black
- add test
- user-data-ansible can set a personalise source
- ExtentionError => ExtensionError
- disable config if ansible is not selected
- do not force use_data usage
- version
- i18n
- output ansible is loaded after
## 0.0.1a3 (2024-12-11)
### Fix
- user-data file is now user-data yaml
## 0.0.1a2 (2024-12-11)
### Fix
- specialize error
## 0.0.1a1 (2024-11-27)
### Fix
- support user data ansible with output ansible
## 0.0.1a0 (2024-11-25)
### Fix
- new ansible plugin loader

View file

@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
[project]
name = "rougail.user_data_ansible"
version = "0.1.0a7"
version = "1.0.0"
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
readme = "README.md"
description = "Rougail user_data ansible"
@ -24,7 +24,7 @@ classifiers = [
]
dependencies = [
"rougail-user-data-yaml >= 0.1,<2",
"rougail-user-data-yaml >= 1.0.0,<2",
"ansible",
]

View file

@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
from pathlib import Path
from ansible.parsing.vault import VaultLib, PromptVaultSecret
try:
from ansible.module_utils.common.text.converters import to_bytes
except ModuleNotFoundError:
@ -31,8 +32,8 @@ from .__version__ import __version__
class RougailUserDataAnsible(RougailUserDataYaml):
"""Load Ansible data from encrypted file
"""
"""Load Ansible data from encrypted file"""
def __init__(
self,
config,
@ -42,6 +43,7 @@ class RougailUserDataAnsible(RougailUserDataYaml):
) -> None:
if rougailconfig is None:
from rougail import RougailConfig
rougailconfig = RougailConfig
user_data = rougailconfig["step.user_data"]
if "ansible" not in user_data:
@ -60,8 +62,7 @@ class RougailUserDataAnsible(RougailUserDataYaml):
self.source = _('the Ansible file "{0}"')
def open(self, filename: str) -> dict:
"""Open file
"""
"""Open file"""
prompt = PromptVaultSecret(
to_bytes(self.secret), "default", ["Vault password: "]
)

View file

@ -1 +1 @@
__version__ = "0.1.0a7"
__version__ = "1.0.0"

View file

@ -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 <http://www.gnu.org/licenses/>.
"""
from .i18n import _