-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhancement(#5229): Merging macos and windows
- Loading branch information
Showing
22 changed files
with
1,082 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,4 @@ pytest==7.4.4 | |
paramiko==3.4.0 | ||
requests==2.31.0 | ||
chardet==5.2.0 | ||
pywinrm==0.3.0 | ||
pywinrm==0.4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
# Copyright (C) 2015, Wazuh Inc. | ||
# Created by Wazuh, Inc. <[email protected]>. | ||
# This program is a free software; you can redistribute it and/or modify it under the terms of GPLv2 | ||
|
||
import ansible_runner | ||
import jinja2 | ||
import yaml | ||
|
||
from pathlib import Path | ||
from pydantic import BaseModel, IPvAnyAddress | ||
from typing import Optional | ||
|
||
from modules.generic.utils import Utils | ||
from modules.generic.logger import Logger | ||
|
@@ -16,7 +18,8 @@ class Inventory(BaseModel): | |
ansible_host: str | IPvAnyAddress | ||
ansible_user: str | ||
ansible_port: int | ||
ansible_ssh_private_key_file: str | ||
ansible_ssh_private_key_file: Optional[str] = None | ||
ansible_password: Optional[str] = None | ||
|
||
|
||
class Ansible: | ||
|
@@ -118,7 +121,9 @@ def generate_inventory(self) -> dict: | |
self.ansible_data.ansible_host: { | ||
'ansible_port': self.ansible_data.ansible_port, | ||
'ansible_user': self.ansible_data.ansible_user, | ||
'ansible_ssh_private_key_file': self.ansible_data.ansible_ssh_private_key_file | ||
**({'ansible_ssh_private_key_file': self.ansible_data.ansible_ssh_private_key_file} | ||
if hasattr(self.ansible_data, 'ansible_ssh_private_key_file') | ||
else {'ansible_password': self.ansible_data.ansible_password}) | ||
} | ||
} | ||
} | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.