Skip to content

shawnallen85/ansible-ubuntu-workstation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ansible-ubuntu-workstation

A set of scripts and playbooks for maintaining consistent Ubuntu workstations.

create-ansible-user.sh

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

setup-ansible.sh

Installs Ansible.

This only needs to be ran on the system you will be running Ansible from.

Applying Playbook

ansible-playbook -i ~/ansible-hosts.yml main.yml

License

This project is licensed under the MIT License - see the LICENSE file for details

About

Ansible scripts for setting up an Ubuntu based workstation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages