Giter Club home page Giter Club logo

Comments (8)

aboe76 avatar aboe76 commented on August 30, 2024

@cboltz did you test the latest version of this formula?
it works on opensuse Leap. without issues.

from mysql-formula.

cboltz avatar cboltz commented on August 30, 2024

not if you define a salt_user ;-) - see my mail on the openSUSE heroes ML for details.

from mysql-formula.

aboe76 avatar aboe76 commented on August 30, 2024

@cboltz
isn't it easier to extend the delete anonymouse stuff with
if the salt_user isn't the mysql_root_user require the salt-user sls state first

something like

servers.sls

{% for host in ['localhost', 'localhost.localdomain', salt['grains.get']('fqdn')] %}
mysql_delete_anonymous_user_{{ host }}:
  mysql_user:
    - absent
    - host: {{ host or "''" }}
    - name: ''
    - connection_host: '{{ mysql_host }}'
    - connection_user: '{{ mysql_salt_user }}'
    {% if mysql_salt_password %}
    - connection_pass: '{{ mysql_salt_password }}'
    {% endif %}
    - connection_charset: utf8
    - require:
      - service: mysqld
      - pkg: mysql_python
      {%- if (mysql_salt_user == mysql_root_user) and mysql_root_password %}
      - cmd: mysql_root_password
      {%- endif %}
      {%- if (mysql_salt_user != mysql_root_user)
      - sls: salt-user
      {%- endif %}
{% endfor %}
{% endif %}
{% endif %}

from mysql-formula.

cboltz avatar cboltz commented on August 30, 2024

I'll take everything that works ;-) - and if it's better than my patch/pull request, I won't object.

from mysql-formula.

aboe76 avatar aboe76 commented on August 30, 2024

I haven't tested it I have tested the default mysql-formula on opensuse tumble and leap without your problems, that's why I was asking if you were running from the latest formula.

from mysql-formula.

aboe76 avatar aboe76 commented on August 30, 2024

@cboltz could you test it in your environment?

from mysql-formula.

cboltz avatar cboltz commented on August 30, 2024

Just to be sure - your proposal means to add (near the end of the section you quoted, around line 60 in server.sls)

      {%- if (mysql_salt_user != mysql_root_user)
      - sls: salt-user
      {%- endif %}

Right?

If I change this to - sls: mysql.salt-user (note the added mysql.) and also add mysql.salt-user to init.sls (as in my initial patch), it works :-)

from mysql-formula.

aboe76 avatar aboe76 commented on August 30, 2024

Yes, that's the idea, except I'm not happy to hear that the mysql.salt-user state should be added by default to the init.sls maybe a similar wrap as the mysql.dev state could be achieved here.

{% set mysql_salt_user = salt['pillar.get']('mysql:salt_user:salt_user_name', False) %}
include:
{% if mysql_salt_user %}
  - mysql.salt-user
{% endif %}

from mysql-formula.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.