SHARE
TWEET

Poop

a guest Jun 12th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ---
  2. - name: install a database
  3.   hosts: test1
  4.   become: true
  5.   become_user: root
  6.   gather_facts: true
  7.   tasks:
  8.     - name: install pip
  9.       apt: pkg=python-pip state=present
  10.  
  11.     - name: install libmysqlclient
  12.       apt: pkg=libmysqlclient-dev state=present
  13.  
  14.     - name: install python mysql
  15.       pip: name=MySQL-python state=present
  16.  
  17.     - name: create database
  18.       mysql_user: user=polytechnic password=pass priv=*.*:ALL state=present
  19.  
  20.     - name: create database
  21.       mysql_db: db=poly state=present
  22.  
  23.     - name: create a table
  24.       command: mysql -u polytechnic -ppass -e 'CREATE TABLE reg (name varchar(30), email varchar(30));' poly
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top