Created
January 26, 2019 03:43
-
-
Save mschirbel/040d0fe03d52ad806dfe409e5f6264cb to your computer and use it in GitHub Desktop.
ansible tasks for downloading mysql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: database | |
become: true | |
tasks: | |
- name: install tools | |
apt: name={{item}} state=present | |
with_items: | |
- python-mysqldb | |
tags: [ 'packages' ] | |
- name: install mysql-server | |
apt: name=mysql-server state=present | |
tags: [ 'packages' ] | |
- name: ensure mysql listening on all ports | |
lineinfile: dest=/etc/mysql/my.cnf regexp=^bind-address line="bind-address = {{ ansible_eth0.ipv4.address }}" | |
notify: restart mysql | |
tags: [ 'configure' ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment