Skip to content

Setup fresh server(s) to make it ready for Ansible. It generates SSH Keys on local if not exists, copies to host, and install Python3.

Notifications You must be signed in to change notification settings

fer-ri/ansible-init-hosts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Init

Setup fresh server(s) to make it ready for Ansible.

It generates SSH Keys on local if not exists, copies to host, and install Python3.

Install Ansible

apt-add-repository --yes --update ppa:ansible/ansible
apt install ansible
ansible --version

Init

Run this command for single server

ansible-playbook -i some-host:host-port, --ask-pass init.yml

Enter server password when prompted.

Note: A , (comma) after host/port is required

To init multiple servers then please setup the hosts (renamed from hosts.example) file in the following format

some-host-1:port ansible_password=host_root_password
some-host-2:port ansible_password=host_root_password

Then run this command

ansible-playbook init.yml

Inspired by prepare-ansible-hosts and ansible-init

About

Setup fresh server(s) to make it ready for Ansible. It generates SSH Keys on local if not exists, copies to host, and install Python3.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published