Creating a user colander
on the target server is a requirement.
To do so, run the following commands:
useradd -m colander --shell /bin/bash
usermod -aG sudo colander
passwd colander
and copy your SSH key.
ssh-copy-id -i ~/.ssh/my-key colander@192.168.122.189
ansible-galaxy role install geerlingguy.docker
ansible-galaxy collection install community.docker
# Install Docker on the target
ansible-playbook -K -i inventory/production/hosts.ini playbooks/docker.yml
# Generate the configuration template
ansible-playbook -i inventory/production/hosts.ini playbooks/configure.yml
# Encrypt the configuration as a vault
ansible-vault encrypt playbooks/vault.yml
# Configure Colander server
ansible-playbook -K -e playbooks/vault.yml -i inventory/production/hosts.ini playbooks/colander_configuration.yml --tags configure