fix: black
This commit is contained in:
parent
399bbf49d1
commit
54d8261137
2 changed files with 6 additions and 4 deletions
|
|
@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from ansible.parsing.vault import VaultLib, PromptVaultSecret
|
from ansible.parsing.vault import VaultLib, PromptVaultSecret
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from ansible.module_utils.common.text.converters import to_bytes
|
from ansible.module_utils.common.text.converters import to_bytes
|
||||||
except ModuleNotFoundError:
|
except ModuleNotFoundError:
|
||||||
|
|
@ -31,8 +32,8 @@ from .__version__ import __version__
|
||||||
|
|
||||||
|
|
||||||
class RougailUserDataAnsible(RougailUserDataYaml):
|
class RougailUserDataAnsible(RougailUserDataYaml):
|
||||||
"""Load Ansible data from encrypted file
|
"""Load Ansible data from encrypted file"""
|
||||||
"""
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
config,
|
config,
|
||||||
|
|
@ -42,6 +43,7 @@ class RougailUserDataAnsible(RougailUserDataYaml):
|
||||||
) -> None:
|
) -> None:
|
||||||
if rougailconfig is None:
|
if rougailconfig is None:
|
||||||
from rougail import RougailConfig
|
from rougail import RougailConfig
|
||||||
|
|
||||||
rougailconfig = RougailConfig
|
rougailconfig = RougailConfig
|
||||||
user_data = rougailconfig["step.user_data"]
|
user_data = rougailconfig["step.user_data"]
|
||||||
if "ansible" not in user_data:
|
if "ansible" not in user_data:
|
||||||
|
|
@ -60,8 +62,7 @@ class RougailUserDataAnsible(RougailUserDataYaml):
|
||||||
self.source = _('the Ansible file "{0}"')
|
self.source = _('the Ansible file "{0}"')
|
||||||
|
|
||||||
def open(self, filename: str) -> dict:
|
def open(self, filename: str) -> dict:
|
||||||
"""Open file
|
"""Open file"""
|
||||||
"""
|
|
||||||
prompt = PromptVaultSecret(
|
prompt = PromptVaultSecret(
|
||||||
to_bytes(self.secret), "default", ["Vault password: "]
|
to_bytes(self.secret), "default", ["Vault password: "]
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ details.
|
||||||
You should have received a copy of the GNU Lesser General Public License
|
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/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from .i18n import _
|
from .i18n import _
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue