Felix Fontein
236b9c0e04
Sort imports with ruff check --fix ( #11400 )
...
Sort imports with ruff check --fix.
2026-01-09 07:40:58 +01:00
Alexei Znamensky
266d9d3fb0
batch 2 - update Python idiom to 3.7 using pyupgrade ( #11342 )
...
* batch 2 - update Python idiom to 3.7 using pyupgrade
* Apply suggestions from code review
2025-12-30 22:50:16 +13:00
Felix Fontein
340ff8586d
Reformat everything.
2025-11-01 13:46:53 +01:00
Felix Fontein
8f8a0e1d7c
Fix __future__ imports, __metaclass__ = type, and remove explicit UTF-8 encoding statement for Python files ( #10886 )
...
* Adjust all __future__ imports:
for i in $(grep -REl "__future__.*absolute_import" plugins/ tests/); do
sed -e 's/from __future__ import .*/from __future__ import annotations/g' -i $i;
done
* Remove all UTF-8 encoding specifications for Python source files:
for i in $(grep -REl '[-][*]- coding: utf-8 -[*]-' plugins/ tests/); do
sed -e '/^# -\*- coding: utf-8 -\*-/d' -i $i;
done
* Remove __metaclass__ = type:
for i in $(grep -REl '__metaclass__ = type' plugins/ tests/); do
sed -e '/^__metaclass__ = type/d' -i $i;
done
2025-10-10 19:52:04 +02:00
Mohammed Babelly
25a262bdcf
Create onepassword_ssh_key plugin ( #9580 )
...
* add 1password_ssh_key lookup
* refactor
* Delete onepassword_ssh_key.py
* Revert "Delete onepassword_ssh_key.py"
This reverts commit e17ff7e232 .
* Delete onepassword_ssh_key.py
* add tests
* add test license
* cleanup
* refactor
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix indentation
* fix RETURN indentation
* use get_option to get ssh_format
* linting
* update project year in copyright
* add plugin to BOTMETA.yml
* use OnePassCLIv2's get_raw and use OnePass's token
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-26 15:24:17 +01:00
Benjamin Mitzkus
6088e2dc0f
fixes #7918 - onepassword lookup fails if field name contains uppercase letters and section is specified ( #7919 )
...
* fix #7918
* Update plugins/lookup/onepassword.py
Co-authored-by: Sam Doran <github@samdoran.com>
* onepassword lookup: transform field ids to lowercase
* #7918 : added unit tests
* #7919 : add changelog fragment
* Update changelogs/fragments/7919-onepassword-fieldname-casing.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Sam Doran <github@samdoran.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2024-02-16 13:53:07 +01:00
Sam Doran
241cc02fa8
onepassword lookup - Make section and field case insensitive ( #7564 )
...
* onepassword lookup: Make section and field case insensitive
This was a regression in behavior when adding support for op v2.
* Return a string by default to avoid an exception if a field is missing
* Use a helper function to lower a value if possible
* Update changelog
2023-12-01 17:47:49 +01:00
Wouter Klein Heerenbrink
1beb38ceff
Use get(..) instead of [..] for safe lookup of value ( Fixes #7240 ) ( #7241 )
...
A OnePassword field item might not have a value (property) when the user has omitted it (on purpose).
2023-09-13 07:48:36 +02:00
Felix Fontein
de1f0ff419
Consolidate onepassword unit tests so that ansible-test will find them when the plugin is modified ( #6075 )
...
Consolidate onepassword unit tests so that ansible-test will find them when the plugin is modified.
2023-02-25 10:57:48 +01:00