Skip to content

Instantly share code, notes, and snippets.

@whytewolf
Created November 18, 2015 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whytewolf/6526bfc300ba8f583be6 to your computer and use it in GitHub Desktop.
Save whytewolf/6526bfc300ba8f583be6 to your computer and use it in GitHub Desktop.
mysql_setup:
debconf.set:
- name: mysql-server
- data:
'mysql-server/root_password': {'type': 'string', 'value': '{{ pillar["mysql_root_password"] }}'}
'mysql-server/root_password_again': {'type': 'string', 'value': '{{ pillar["mysql_root_password"] }}'}
mysql-server:
pkg.installed:
- pkgs:
- mysql-server
- mysql-client
- python-mysqldb
- mysqltuner
- mytop
mysql-config:
file.managed:
- name: /etc/mysql/my.cnf
- source: salt://mysql/files/my.cnf
mysql-service:
service.running:
- name: mysql
- enable: true
- watch:
- file: mysql-config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment