Skip to content

Hassanzadeh-sd/ansible-common

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ansible_playbooks

these are the playbooks used for configuration management and multi-machine deployment system.

Install Ansible

Ubuntu

sudo apt update
sudo apt upgrade -y
sudo reboot
sudo apt install -y software-properties-common
sudo add-apt-repository --yes --update ppa:ansible/ansible
sudo apt update
sudo apt install -y ansible
ansible --version

Setup SSH keys and share it among managed nodes

ssh-keygen
ssh-copy-id node1.example.com

Run Playbooks

first of all you have to set server ssh's pass word in group vars and host vars with ansible_sudo_pass env example : group_vars/all.yaml

ansible_sudo_pass: 'pass'

or run playbook first run :

ansible-playbook set_sudoer.yaml -b -K

and install vim and docker and nginx with this command :

ansible-playbook -i inventory/hosts.yaml playbooks/initial_tasks.yaml

About

ansible requirements

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published