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
2,768 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
746 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
941 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 Aug 2, 2020 in Ansible by MD
• 95,440 points
1,065 views
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,520 views
+2 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
2,322 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP