Skip to content

Instantly share code, notes, and snippets.

@mschirbel
Created January 26, 2019 03:43
Show Gist options
  • Save mschirbel/040d0fe03d52ad806dfe409e5f6264cb to your computer and use it in GitHub Desktop.
Save mschirbel/040d0fe03d52ad806dfe409e5f6264cb to your computer and use it in GitHub Desktop.
ansible tasks for downloading mysql
---
- 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