Added DOCUMENTATION to musql_db module.

reviewable/pr18780/r1
Marco Vito Moscaritolo 12 years ago
parent 63c7ee45d7
commit 7416297548

@ -19,6 +19,60 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
DOCUMENTATION = '''
---
module: mysql_db
short_description: Add or remove MySQL databases from a remote host.
description:
- Add or remove MySQL databases from a remote host.
version_added: "0.6"
options:
name:
description:
- name of the database to add or remove
required: true
default: null
login_user:
description:
- The username used to authenticate with
required: false
default: null
login_password:
description:
- The passwordused to authenticate with
required: false
default: null
login_host:
description:
- Host running the database
required: false
default: localhost
state:
description:
- The database state
required: false
default: present
choices: [ "present", "absent" ]
collation:
description:
- Collation mode
required: false
default: null
encoding:
description:
- Encoding mode
required: false
default: null
examples:
- code: mysql_db db=bobdata state=present
description: create a new database with name 'bobdata'
notes:
- Requires the MySQLdb Python package on the remote host. For Ubuntu, this is as easy as apt-get install python-mysqldb.
- Both 'login_password' and 'login_username' are required when you are passing credentials. If none are present, the module will attempt to read the credentials from ~/.my.cnf, and finally fall back to using the MySQL default login of 'root' with no password.
requirements: [ ConfigParser ]
author: Mark Theunissen
'''
import ConfigParser
try:
import MySQLdb

Loading…
Cancel
Save