Skip to content
Snippets Groups Projects
pillar.example 3.06 KiB
Newer Older
  • Learn to ignore specific revisions
  •   global:
        client-server:
          default_character_set: utf8
    
      clients:
        mysql:
          default_character_set: utf8
        mysqldump:
          default_character_set: utf8
    
      library:
        client:
          default_character_set: utf8
    
    
        # Use this account for database admin (defaults to root)
        root_user: 'admin'
    
        # root_password: '' - to have root@localhost without password
    
        root_password_hash: '*13883BDDBE566ECECC0501CDE9B293303116521A'
    
        # If you only manage the dbs and users and the server is on
        # another host
        host: 123.123.123.123
    
        # my.cnf sections changes
    
          # you can use either underscore or hyphen in param names
    
          log_bin: /var/log/mysql/mysql-bin.log
    
          auto_increment_increment: 5
    
          binlog-ignore-db:
           - mysql
           - sys
           - information_schema
           - performance_schema
    
        mysql:
          # my.cnf param that not require value
          no-auto-rehash: noarg_present
    
      salt_user:
        salt_user_name: 'salt'
        salt_user_password: 'someotherpass'
        grants:
          - 'all privileges'
    
    
      # Manage databases
      database:
        - foo
    
    Nate Houk's avatar
    Nate Houk committed
        - bar
    
      schema:
        foo:
          load: True
          source: salt://mysql/files/foo.schema
        bar:
          load: False
    
        baz:
          load: True
          source: salt://mysql/files/baz.schema.tmpl
          template: jinja
    
        qux:
          load: True
          source: salt://mysql/files/qux.schema.tmpl
          template: jinja
          context:
            encabulator: Turbo
            girdlespring: differential
        quux:
          load: True
          source: salt://mysql/files/qux.schema.tmpl
          template: jinja
          context:
            encabulator: Retro
            girdlespring: integral
    
    Arthur Lutz's avatar
    Arthur Lutz committed
      # you can get pillar for existing server using scripts/import_users.py script
    
          host: localhost
          databases:
            - database: foo
              grants: ['select', 'insert', 'update']
            - database: bar
              grants: ['all privileges']
    
          password_hash: '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4'
    
          ssl: True
          ssl-X509: True
          ssl-SUBJECT: Subject
          ssl-ISSUER: Name
          ssl-CIPHER: Cipher
    
          databases:
            - database: foo
              grants: ['all privileges']
    
              grants: ['select', 'insert', 'update', 'delete']
    
        nopassuser:
    
          password: ~
          host: localhost
          databases: []
    
        application:
          password: 'somepass'
          mine_hosts:
            target: "G@role:database and *.example.com"
            function: "network.get_hostname"
            expr_form: compound
          databases:
            - database: foo
              grants: ['select', 'insert', 'update']
    
      # Override any names defined in map.jinja
    
      lookup:
        server: mysql-server
        client: mysql-client
        service: mysql-service
    
    zhujinhe's avatar
    zhujinhe committed
        # Install dev package - defaults to False
        install: False