node-dev-vagrant-example icon indicating copy to clipboard operation
node-dev-vagrant-example copied to clipboard

Invalid requisite type

Open anthonymartin opened this issue 10 years ago • 1 comments

I'm receiving the following error: Invalid requisite type 'mysql_user.present' in state 'dbconfig', in SLS 'mysql'. Requisite types must not contain dots, did you mean 'mysql_user'?

When I try mysql_user it says the function is not defined. Any ideas?

anthonymartin avatar May 04 '14 21:05 anthonymartin

Ok, I figured it out.

You need to remove the .present beneath the required keys. For example:

dbconfig:
  mysql_user.present:
    - name: vagruser
    - password: devman
    - require:
      - service: mysql
      - pkg: python-mysqldb

  mysql_database.present:
    - name: workoutbot
    - require:
      - mysql_user: dbconfig

  mysql_grants.present:
    - grant: all privileges
    - database: workoutbot.*
    - user: vagruser
    - require:
      - mysql_database: dbconfig 

anthonymartin avatar May 04 '14 22:05 anthonymartin