Skip to content

itexia/ansible.role.create-mysqldb-and-user-using-plesk-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Role: Create a new mysql database and user using PLESK API

Creates a new database user and database in Plesk.

Requirements

  • a server running plesk
  • this role requires admin access for plesk
  • lxml >= 2.3.0

Role Variables

Required variables are listed below and can be set with values (see vars/main.yml):

host_url: <your-strato-server-id>.stratoserver.net
host_port: 8443

dbname: "dbmydomain"
dbuser: "dbuser"
dbpw: "secure-db-pw"

plesk_admin_user: "admin"
plesk_admin_pw: "secure-admin-pw"

Available variables are listed below, along with default values (see defaults/main.yml):

webspace_id: 1
dbtype: "mysql"

Dependencies

None.

Example Playbook

- hosts: strato-server
  become: yes
  vars_files:
    - vars/main.yml
  roles:
    - { role: ansible.role.create-mysqldb-and-user-using-plesk-api }

Inside vars/main.yml:

host_url: <your-strato-server-id>.stratoserver.net
host_port: 8443

dbname: "dbmydomain"
dbuser: "dbuser"
dbpw: "secure-db-pw"

plesk_admin_user: "admin"
plesk_admin_pw: "secure-admin-pw"

Authors

This role was created in 2018 by Sergej Kukshausen and Susann Sgorzaly.

Releases

No releases published

Packages

No packages published