Skip to content

Instantly share code, notes, and snippets.

@skylerberg
Created September 4, 2014 00:40
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 skylerberg/78f00f2928ee933cf19b to your computer and use it in GitHub Desktop.
Save skylerberg/78f00f2928ee933cf19b to your computer and use it in GitHub Desktop.
Adding watch_in breaks mysql.database???
salt-testing-b61851f5-fc40-456f-a6c5-31e297a32ceb:
----------
ID: apache
Function: pkg.installed
Name: apache2
Result: True
Comment: The following packages were installed/updated: apache2.
Changes:
----------
apache2:
----------
new:
2.2.22-1ubuntu1.7
old:
apache2-mpm-worker:
----------
new:
2.2.22-1ubuntu1.7
old:
apache2-utils:
----------
new:
2.2.22-1ubuntu1.7
old:
apache2.2-bin:
----------
new:
2.2.22-1ubuntu1.7
old:
apache2.2-common:
----------
new:
2.2.22-1ubuntu1.7
old:
libapr1:
----------
new:
1.4.6-1
old:
libaprutil1:
----------
new:
1.3.12+dfsg-3
old:
libaprutil1-dbd-sqlite3:
----------
new:
1.3.12+dfsg-3
old:
libaprutil1-ldap:
----------
new:
1.3.12+dfsg-3
old:
libcap2:
----------
new:
1:2.22-1ubuntu3
old:
ssl-cert:
----------
new:
1.0.28ubuntu0.1
old:
----------
ID: apache
Function: service.running
Name: apache2
Result: True
Comment: Service apache2 is already enabled, and is in the desired state
Changes:
----------
ID: apache-reload
Function: module.wait
Name: service.reload
Result: True
Comment:
Changes:
----------
ID: mysql_debconf
Function: debconf.set
Name: mysql-server
Result: True
Comment:
Changes:
----------
mysql-server/root_password:
(password hidden)
mysql-server/root_password_again:
(password hidden)
mysql-server/start_on_boot:
true
----------
ID: mysqld
Function: pkg.installed
Name: mysql-server
Result: True
Comment: The following packages were installed/updated: mysql-server.
Changes:
----------
libdbd-mysql-perl:
----------
new:
4.020-1build2
old:
libdbi-perl:
----------
new:
1.616-1build2
old:
libhtml-template-perl:
----------
new:
2.10-1
old:
libmysqlclient18:
----------
new:
5.5.38-0ubuntu0.12.04.1
old:
libnet-daemon-perl:
----------
new:
0.48-1
old:
libplrpc-perl:
----------
new:
0.2020-2
old:
libterm-readkey-perl:
----------
new:
2.30-4build3
old:
mysql-client-5.5:
----------
new:
5.5.38-0ubuntu0.12.04.1
old:
mysql-client-core-5.5:
----------
new:
5.5.38-0ubuntu0.12.04.1
old:
mysql-common:
----------
new:
5.5.38-0ubuntu0.12.04.1
old:
mysql-server:
----------
new:
5.5.38-0ubuntu0.12.04.1
old:
mysql-server-5.5:
----------
new:
5.5.38-0ubuntu0.12.04.1
old:
mysql-server-core-5.5:
----------
new:
5.5.38-0ubuntu0.12.04.1
old:
----------
ID: mysql_config
Function: file.managed
Name: /etc/mysql/my.cnf
Result: True
Comment: File /etc/mysql/my.cnf updated
Changes:
----------
diff:
---
+++
@@ -1,3 +1,4 @@
+# This file managed by Salt, do not edit by hand!!
#
# The MySQL database server configuration file.
#
----------
ID: mysqld
Function: service.running
Name: mysql
Result: True
Comment: Service restarted
Changes:
----------
mysql:
True
----------
ID: mysql_db_0
Function: mysql_database.present
Name: wikidb
Result: False
Comment: State mysql_database.present found in sls mysql.database is unavailable
Changes:
----------
ID: mysql_user_0
Function: mysql_user.present
Name: wikiuser
Result: False
Comment: One or more requisite failed
Changes:
----------
ID: mysql_user_0_0
Function: mysql_grants.present
Name: wikiuser_wikidb
Result: False
Comment: One or more requisite failed
Changes:
----------
ID: php5
Function: pkg.installed
Result: False
Comment: One or more requisite failed
Changes:
----------
ID: apache-restart
Function: module.wait
Name: service.restart
Result: False
Comment: One or more requisite failed
Changes:
----------
ID: mysql_python
Function: pkg.installed
Name: python-mysqldb
Result: True
Comment: The following packages were installed/updated: python-mysqldb.
Changes:
----------
python-mysqldb:
----------
new:
1.2.3-1ubuntu0.1
old:
Summary
------------
Succeeded: 8
Failed: 5
------------
Total: 13
include:
- apache
- mysql
php5:
pkg.installed:
- require:
- sls: mysql.server
- sls: mysql.database
- sls: mysql.user
- watch_in:
- module: apache-restart
mysql:
server:
root_password: 'password'
user: mysql
bind-address: 127.0.0.1
port: 3306
# Manage databases
database:
- wikidb
# Manage users
user:
- name: wikiuser
password: 'password'
host: localhost
databases:
- database: wikidb
grants: ['all privileges']
salt-testing-84c71994-288c-4b6b-b493-a22d0eb1e7aa:
----------
ID: apache
Function: pkg.installed
Name: apache2
Result: True
Comment: The following packages were installed/updated: apache2.
Changes:
----------
apache2:
----------
new:
2.2.22-1ubuntu1.7
old:
apache2-mpm-worker:
----------
new:
2.2.22-1ubuntu1.7
old:
apache2-utils:
----------
new:
2.2.22-1ubuntu1.7
old:
apache2.2-bin:
----------
new:
2.2.22-1ubuntu1.7
old:
apache2.2-common:
----------
new:
2.2.22-1ubuntu1.7
old:
libapr1:
----------
new:
1.4.6-1
old:
libaprutil1:
----------
new:
1.3.12+dfsg-3
old:
libaprutil1-dbd-sqlite3:
----------
new:
1.3.12+dfsg-3
old:
libaprutil1-ldap:
----------
new:
1.3.12+dfsg-3
old:
libcap2:
----------
new:
1:2.22-1ubuntu3
old:
ssl-cert:
----------
new:
1.0.28ubuntu0.1
old:
----------
ID: apache
Function: service.running
Name: apache2
Result: True
Comment: Service apache2 is already enabled, and is in the desired state
Changes:
----------
ID: apache-reload
Function: module.wait
Name: service.reload
Result: True
Comment:
Changes:
----------
ID: apache-restart
Function: module.wait
Name: service.restart
Result: True
Comment:
Changes:
----------
ID: mysql_debconf
Function: debconf.set
Name: mysql-server
Result: True
Comment:
Changes:
----------
mysql-server/root_password:
(password hidden)
mysql-server/root_password_again:
(password hidden)
mysql-server/start_on_boot:
true
----------
ID: mysqld
Function: pkg.installed
Name: mysql-server
Result: True
Comment: The following packages were installed/updated: mysql-server.
Changes:
----------
libdbd-mysql-perl:
----------
new:
4.020-1build2
old:
libdbi-perl:
----------
new:
1.616-1build2
old:
libhtml-template-perl:
----------
new:
2.10-1
old:
libmysqlclient18:
----------
new:
5.5.38-0ubuntu0.12.04.1
old:
libnet-daemon-perl:
----------
new:
0.48-1
old:
libplrpc-perl:
----------
new:
0.2020-2
old:
libterm-readkey-perl:
----------
new:
2.30-4build3
old:
mysql-client-5.5:
----------
new:
5.5.38-0ubuntu0.12.04.1
old:
mysql-client-core-5.5:
----------
new:
5.5.38-0ubuntu0.12.04.1
old:
mysql-common:
----------
new:
5.5.38-0ubuntu0.12.04.1
old:
mysql-server:
----------
new:
5.5.38-0ubuntu0.12.04.1
old:
mysql-server-5.5:
----------
new:
5.5.38-0ubuntu0.12.04.1
old:
mysql-server-core-5.5:
----------
new:
5.5.38-0ubuntu0.12.04.1
old:
----------
ID: mysql_config
Function: file.managed
Name: /etc/mysql/my.cnf
Result: True
Comment: File /etc/mysql/my.cnf updated
Changes:
----------
diff:
---
+++
@@ -1,3 +1,4 @@
+# This file managed by Salt, do not edit by hand!!
#
# The MySQL database server configuration file.
#
----------
ID: mysqld
Function: service.running
Name: mysql
Result: True
Comment: Service restarted
Changes:
----------
mysql:
True
----------
ID: mysql_python
Function: pkg.installed
Name: python-mysqldb
Result: True
Comment: The following packages were installed/updated: python-mysqldb.
Changes:
----------
python-mysqldb:
----------
new:
1.2.3-1ubuntu0.1
old:
----------
ID: mysql_db_0
Function: mysql_database.present
Name: wikidb
Result: True
Comment: The database wikidb has been created
Changes:
----------
wikidb:
Present
----------
ID: mysql_user_0
Function: mysql_user.present
Name: wikiuser
Result: True
Comment: The user wikiuser@localhost has been added
Changes:
----------
wikiuser:
Present
----------
ID: mysql_user_0_0
Function: mysql_grants.present
Name: wikiuser_wikidb
Result: True
Comment: Grant all privileges on wikidb.* to wikiuser@localhost has been added
Changes:
----------
wikiuser_wikidb:
Present
----------
ID: php5
Function: pkg.installed
Result: True
Comment: The following packages were installed/updated: php5.
Changes:
----------
apache2-mpm:
----------
new:
old:
1
apache2-mpm-prefork:
----------
new:
2.2.22-1ubuntu1.7
old:
apache2-mpm-worker:
----------
new:
old:
2.2.22-1ubuntu1.7
httpd:
----------
new:
old:
1
httpd-cgi:
----------
new:
old:
1
libapache2-mod-php5:
----------
new:
5.3.10-1ubuntu3.13
old:
php5:
----------
new:
5.3.10-1ubuntu3.13
old:
php5-cli:
----------
new:
5.3.10-1ubuntu3.13
old:
php5-common:
----------
new:
5.3.10-1ubuntu3.13
old:
Summary
-------------
Succeeded: 13
Failed: 0
-------------
Total: 13
include:
- apache
- mysql
php5:
pkg.installed:
- require:
- sls: mysql.server
- sls: mysql.database
- sls: mysql.user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment