A set of scripts and playbooks for maintaining consistent Ubuntu workstations.
Creates a user named ansible with a random password.
It assumes that a file, "ansible-user.pub", exists in your current working directory.
Below is an example of generating this file:
ssh-keygen -t rsa -b 4096 -C "ansible@example.com" -f ansible-user -q -N ""
That key will be used for configuring passwordless SSH logins.
This should be ran on all systems that will be maintained by Ansible.
This will also add a line to the /etc/sudoers
file that allows for passwordless sudo.
You can access this user utilizing sudo:
sudo -u ansible -i
Get ansible-user.pub via web host on node:
curl https://example.org/ansible-user.pub -o ansible-user.pub
Copy ansible-user.pub via scp from host:
scp ansible-user.pub node:/home/${USER}
Once ansible-user.pub is on the node, run the following on the node:
curl -s https://raw.githubusercontent.com/shawnallen85/ansible-ubuntu-workstation/master/create-ansible-user.sh | sudo bash
Installs Ansible.
This only needs to be ran on the system you will be running Ansible from.
ansible-playbook -i ~/ansible-hosts.yml main.yml
This project is licensed under the MIT License - see the LICENSE file for details