|
|
@ -27,20 +27,19 @@ from ansible.module_utils.common.yaml import HAS_LIBYAML, Parser
|
|
|
|
if HAS_LIBYAML:
|
|
|
|
if HAS_LIBYAML:
|
|
|
|
class AnsibleLoader(Parser, AnsibleConstructor, Resolver): # type: ignore[misc] # pylint: disable=inconsistent-mro
|
|
|
|
class AnsibleLoader(Parser, AnsibleConstructor, Resolver): # type: ignore[misc] # pylint: disable=inconsistent-mro
|
|
|
|
def __init__(self, stream, file_name=None, vault_secrets=None):
|
|
|
|
def __init__(self, stream, file_name=None, vault_secrets=None):
|
|
|
|
Parser.__init__(self, stream) # pylint: disable=non-parent-init-called
|
|
|
|
Parser.__init__(self, stream)
|
|
|
|
AnsibleConstructor.__init__(self, file_name=file_name, vault_secrets=vault_secrets)
|
|
|
|
AnsibleConstructor.__init__(self, file_name=file_name, vault_secrets=vault_secrets)
|
|
|
|
Resolver.__init__(self)
|
|
|
|
Resolver.__init__(self)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
from yaml.composer import Composer
|
|
|
|
from yaml.composer import Composer
|
|
|
|
from yaml.reader import Reader
|
|
|
|
from yaml.reader import Reader
|
|
|
|
from yaml.scanner import Scanner
|
|
|
|
from yaml.scanner import Scanner
|
|
|
|
from yaml.parser import Parser
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class AnsibleLoader(Reader, Scanner, Parser, Composer, AnsibleConstructor, Resolver): # type: ignore[misc,no-redef] # pylint: disable=inconsistent-mro
|
|
|
|
class AnsibleLoader(Reader, Scanner, Parser, Composer, AnsibleConstructor, Resolver): # type: ignore[misc,no-redef] # pylint: disable=inconsistent-mro
|
|
|
|
def __init__(self, stream, file_name=None, vault_secrets=None):
|
|
|
|
def __init__(self, stream, file_name=None, vault_secrets=None):
|
|
|
|
Reader.__init__(self, stream)
|
|
|
|
Reader.__init__(self, stream)
|
|
|
|
Scanner.__init__(self)
|
|
|
|
Scanner.__init__(self)
|
|
|
|
Parser.__init__(self) # type: ignore[call-arg] # pylint: disable=non-parent-init-called
|
|
|
|
Parser.__init__(self)
|
|
|
|
Composer.__init__(self)
|
|
|
|
Composer.__init__(self)
|
|
|
|
AnsibleConstructor.__init__(self, file_name=file_name, vault_secrets=vault_secrets)
|
|
|
|
AnsibleConstructor.__init__(self, file_name=file_name, vault_secrets=vault_secrets)
|
|
|
|
Resolver.__init__(self)
|
|
|
|
Resolver.__init__(self)
|
|
|
|