wazuh / wazuh-qa

Wazuh - Quality Assurance
GNU General Public License v2.0
60 stars 30 forks source link

DTT1 - Allocation Module - Standarization of inventory.yaml in macOS - vagrant instances #5236

Closed pro-akim closed 2 weeks ago

pro-akim commented 2 weeks ago

Deploying a macOS machine in vagrant (MacMini), the data in the generated inventory.yaml does not have the same format as the rest of the instances.

This makes its use difficult for automation processes and also can generate confusion for the user.

In this example it is possible to see sonoma macOS inventory.yaml which has a different parameters.

akim@akim-PC:~/Desktop/personal$ cat /tmp/dtt1-poc/agent-macos-sonoma-14.0-arm64/inventory.yaml 
ansible_connection: ssh
ansible_host: 10.xx.0.xxx
ansible_password: xxxx
ansible_port: xxxxx

akim@akim-PC:~/Desktop/personal$ cat /tmp/dtt1-poc/agent-linux-ubuntu-22.04-amd64/inventory.yaml 
ansible_connection: ssh
ansible_host: 192.xxx.xx.5
ansible_port: 22
ansible_ssh_private_key_file: /tmp/wazuh-qa/VAGRANT-3BF43C4E-CD8D-4C6F-858A-01BD18BC1BC3/instance_key
ansible_user: vagrant

akim@akim-PC:~/Desktop/personal$ cat /tmp/dtt1-poc/agent-macos-monterey-12.7.3-amd64/inventory.yaml 
ansible_connection: ssh
ansible_host: ec2-xx-91-4-xx.compute-1.amazonaws.com
ansible_port: xxxx
ansible_ssh_private_key_file: /home/xx/Desktop/xxx/xxx
ansible_user: xxxxuser
teddytpc1 commented 2 weeks ago

The different parameters are related to the connection method. Some resources will use SSH key and others will use credentials (username/password). So, no changes are needed.