Embracing the Messiness in Search of Epic Solutions

Tag: Ansible

  • Ansible: Handling Sudo Password with Homebrew

    Problem When using the Ansible playbook to run Homebrew-related modules, it will prompt for a sudo password where necessary on specific tasks. For example, using the community.general.homebrew_cask module to (un)install the apps under /Applications directory will prompt for a sudo password on each app. It is not possible to preemptively prompt for a sudo password… Read More…

  • Ansible: Handling Multiple Hosts via SSH

    PROBLEM To run Ansible playbook in multiple hosts via SSH. SOLUTION Configuring SSH environment Ensure SSH keypair exists on the current machine (ex: ~/.ssh/id_rsa for private key and ~/.ssh/id_rsa.pub for public key). If you do not have one, create one: Copy the public key (ex: ~/.ssh/id_rsa.pub) to each remote host’s ~/.ssh/authorized_keys. If this file doesn’t… Read More…