Skip to content
This repository has been archived by the owner on Aug 29, 2022. It is now read-only.

takamario/ansible_template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup Local Environment with Ansible

Configure ssh. Before execute ansible, put result of vagrant ssh-config to ~/.ssh/config like this.

Host hogehogecentos-6.6
  HostName 127.0.0.1
  User vagrant
  Port 2272
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile /home/takamario/hogehoge-vagrant-box-centos-6.6/.vagrant/machines/default/virtualbox/private_key
  IdentitiesOnly yes
  LogLevel FATAL

Install pip. (Need sudo when use system python)

curl https://bootstrap.pypa.io/get-pip.py | python

Install Ansible. (Need sudo when use system python)

pip intall ansible

Run all roles. If you want to specify the role, --tags will help.

# Run all roles
ansible-playbook -i local-centos-6.6 local-centos-6.6-playbook.yml

# Run only "nginx" role with tag
ansible-playbook -i local-centos-6.6 local-centos-6.6-playbook.yml --tags nginx