Dasharo / open-source-firmware-validation

OSFV infrastructure with automated tests and scripts for managing test results
Apache License 2.0
7 stars 1 forks source link

Adds possibility to run ansible playbooks on target #193

Closed TomaszAIR closed 7 months ago

TomaszAIR commented 7 months ago

Provides possibility to run ansible playbooks on targets using SSH connection

TomaszAIR commented 7 months ago

Tested on qemu with Ubuntu booted and simple test.yml that creates hello-world file in ~/tmp.

Test execution

λ robot -b file.txt -L TRACE -v ansible_config:yes -v rte_ip:127.0.0.1 -v snipeit:no -v config:qemu -t "SBO001.001*" dasharo-security/secure-boot.robot
==============================================================================
Secure-Boot                                                                   
==============================================================================
SBO001.001 Check Secure Boot default state (firmware) :: This test... | PASS |
------------------------------------------------------------------------------
Secure-Boot                                                           | PASS |
1 test, 1 passed, 0 failed
==============================================================================
Debug:   /home/tzyjewski/files/open-source-firmware-validation/file.txt
Output:  /home/tzyjewski/files/open-source-firmware-validation/output.xml
Log:     /home/tzyjewski/files/open-source-firmware-validation/log.html
Report:  /home/tzyjewski/files/open-source-firmware-validation/report.html

File in Ubuntu

λ ssh ubuntu@127.0.0.1 -p 5222                                                                                                                         
ubuntu@127.0.0.1's password: 
Welcome to Ubuntu 22.04.3 LTS (GNU/Linux 6.2.0-39-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

Expanded Security Maintenance for Applications is not enabled.

43 updates can be applied immediately.
To see these additional updates run: apt list --upgradable

1 additional security update can be applied with ESM Apps.
Learn more about enabling ESM Apps service at https://ubuntu.com/esm

Last login: Tue Jan 16 08:25:04 2024 from 10.0.2.2
ubuntu@3mdeb:~$ cat ~/tmp 
Hello World