ansible app -b -m yum -a "name=MySQL-python state=present" -i hosts -u vagrant
ansible app -b -m yum -a "name=python-setuptools state=present" -i hosts -u vagrant
ansible app -b -m easy_install -a "name=django<2 state=present" -i hosts -u vagrant

ansible app -a "python -c 'import django; print django.get_version()'" -i hosts -u vagrant

ansible db -b -m yum -a "name=mariadb-server state=present" -i hosts -u vagrant
ansible db -b -m service -a "name=mariadb state=started enabled=yes" -i hosts -u vagrant
ansible db -b -a "iptables -F" -i hosts -u vagrant
ansible db -b -a "iptables -A INPUT -s 192.168.60.0/24 -p tcp -m tcp --dport 3306 -j ACCEPT" -i hosts -u vagrant

ansible db -b -m yum -a "name=MySQL-python state=present" -i hosts -u vagrant
ansible db -b -m mysql_user -a "name=django host=% password=12345 priv=*.*:ALL state=present" -i hosts -u vagrant

When you subscribe to the blog, we will send you an e-mail when there are new updates on the site so you wouldn't miss them.
評論