Learn Ansible

Ansible manages remote machines over SSH. No agents needed. You write playbooks in YAML that describe what the target state should be, and Ansible makes it happen. SSH setup Generate a key pair on the control node and copy it to your targets: ssh-keygen -t rsa ssh-copy-id username@target_host Inventory An inventory file lists your hosts and groups them: # my_inventory.ini [web] 192.168.1.2 [db] 192.168.1.3 You can also use dynamic inventory scripts that output JSON. ...

Using Ansible with Packer

Packer builds machine images. Ansible configures servers. Together, they let you bake your configuration straight into the image – no manual setup required after deployment. The Ansible provisioner in Packer runs your playbooks during the image build process. You write a normal Ansible playbook, point Packer at it, and when the image is ready, your software is already installed and configured. Note: If you specify a remote_user in your Ansible tasks, Packer will ignore it. The provisioner connects using the username from Packer’s own configuration. ...