Ansible playbook to create a new database

0 votes
Can someone help me write an ansible task to create database? Thanks in advance.
Aug 8, 2019 in Ansible by Pravalika
801 views

1 answer to this question.

0 votes

Hi pravalika, its pretty simple.  You just have to use the mysql_db module if you're using mysql. Mention the name of the database and the state. 

- name: Create a new database with name 'bobdata'
  mysql_db:
    name: mydatabase
    state: present

answered Aug 8, 2019 by Trvais

Related Questions In Ansible

0 votes
1 answer

How to create a new encrpted file using Ansible Vault?

If you are creating a new file ...READ MORE

answered Jan 29, 2019 in Ansible by Kyraa
154 views
0 votes
1 answer

ansible playbook to create and remove a WebSphere Application Server Node Agent profile

This should workout: - name: Create profile_nodeagent: ...READ MORE

answered Oct 30, 2019 in Ansible by Tanishq
162 views
0 votes
1 answer

How to create a variable in Ansible Playbook?

Hi@akhtar, Variable in playbooks are very similar to using variables in ...READ MORE

answered 4 days ago in Ansible by MD
• 41,020 points
19 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,420 points
594 views
0 votes
1 answer
0 votes
1 answer

Ansible Playbook to create a Load Balancer

Hey @Himanshu, you can try something like ...READ MORE

answered Mar 25, 2019 in Ansible by Jack
926 views