Skip to content

euchungmsft/baba-ansible-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

baba-ansible-examples

Ansible examples

To run these examples

  1. Install Ansible at your controller See http://docs.ansible.com/ansible/latest/intro_installation.html

Config Ansible hosts

$ echo "127.0.0.1" > ~/ansible_hosts
$ export ANSIBLE_INVENTORY=~/ansible_hosts

Configuring Ansible inventories http://docs.ansible.com/ansible/latest/intro_inventory.html

  1. Create nodes to run the playbooks from Aliyun Portal

  2. SSH key generation and deploy it to all nodes

Key generation

$ ssh-keygen -t rsa 

Deploying the key

$ ssh-copy-id [account, root]@[host name]
  1. Test config

    $ ansible all -m ping

.