run ansible playbook
Here’s the command to run the Ansible playbook. ansible-playbook -t hosts playbook.yml Or simply run it like this. ansible-playbook playbook.yml
Here’s the command to run the Ansible playbook. ansible-playbook -t hosts playbook.yml Or simply run it like this. ansible-playbook playbook.yml
Here’s the command to test a network connection in Powershell. C:> Test-NetConnection -ComputerName server -Port 443 Result: ComputerName : server RemoteAddress : 10.0.0.5 RemotePort : 443 InterfaceAlias : Ethernet 0 SourceAddress : 10.1.1.34 TcpTestSucceeded : True
If you have a video with audio sync issues, you can easily fix it using ffmpeg. It takes 2 inputs: the filename and delay: 0.100 is 100 ms or 0.1 seconds. Output file has -fixed appended to it. It’s fast. Only takes 2-3 seconds to process a 1.5 hour recording. Here’s the script. ffmpeg -i livestream.mp4 \ -itsoffset 0.100 \ -i livestream.mp4 \ -map 0:0 -map 1:1 \ -acodec copy \ -vcodec copy \ livestream-fixed.mp4
In order to restore a MySQL database to another database, use routines and triggers. mysqldump -p user -p --routines --triggers db1 > db1.sql To restore to another database, just use the normal command. mysql -u user -p db2
When trying to boot from a disk created from snapshot and you’re getting an “UEFI feature is not available for this project” error, you’ll need to create a boot image with the –guest-os-features option set to “UEFI_COMPATIBLE.” gcloud compute disks create new-server-disk-2 \ --project=project-name \ --source-snapshot=server-disk-2 \ --zone=us-central1-b \ --guest-os-features="UEFI_COMPATIBLE" It’s about enabling guest operating system features on custom images. The guest operating system features let you configure networking, security, storage, and operating system options on custom images to be used on boot disks.
If you see packages are being kept back in Ubuntu, you can run the following to force an update. sudo apt-get --with-new-pkgs upgrade
Here’s how to get a list of certificates in AWS Certificate Manager. aws acm list-certificates \ --profile default \ --region us-east-1 \ --output text \ --query 'CertificateSummaryList[*].{ARN:CertificateArn,Domain:DomainName}'
To install 7zip. yum install 7za apt install p7zip To extract. 7za e compressedfile.7z To archive. 7za a myarchive.7z myfiles/
Here’s how to display a list of Google Cloud forwarding rules. gcloud compute forwarding-rules list If you want global only. gcloud compute forwarding-rules --global Or just local regions only. gcloud compute forwarding-rules --filter="region:( us-central us-west1 )"
How to convert MP3 to OGG audio format. ffmpeg -i in.mp3 -ar 48000 -vn -c:a libvorbis out.ogg If you have sample rate errors, use -vn.