Skip to content

Instantly share code, notes, and snippets.

@techzhou
Created February 22, 2014 17:24
Show Gist options
  • Save techzhou/9158476 to your computer and use it in GitHub Desktop.
Save techzhou/9158476 to your computer and use it in GitHub Desktop.
percona-apt:
cmd:
- run
- name: apt-key adv --keyserver keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A
- unless: apt-key list | grep -q 1C4CBDCDCD2EFD2A
/etc/apt/sources.list.d/percona.list:
file:
- managed
- source: salt://mysql/percona.list
- user: root
- group: root
- mode: 644
- template: jinja
- codename: {{ pillar['codename'] }}
mysql:
pkg:
- latest
- names:
- percona-server-server-5.6
- percona-server-client-5.6
- require:
- cmd: percona-apt
- file: /etc/apt/sources.list.d/percona.list
service:
- running
- enable: True
set-mysql-remote:
cmd.run:
- name: 'echo "update user set host = ''%'' where user = ''root'' and host = ''localhost'';flush privileges;" | /usr/bin/env HOME=/ mysql -uroot mysql'
- onlyif: '/usr/bin/env HOME=/ mysql -u root'
- require:
- service: mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment