Skip to content

Instantly share code, notes, and snippets.

Created July 7, 2014 11:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save anonymous/c2e6da03fa374d1e3424 to your computer and use it in GitHub Desktop.
Salt + Docker evaluation issue
"sameersbn/mysql:latest":
docker.pulled:
- require:
- service: docker
gitlab_mysql_container:
docker.installed:
- name: mysql
- image: "sameersbn/mysql:latest"
- binds:
/opt/mysql/data: /var/lib/mysql
- require:
- docker: "sameersbn/mysql:latest"
gitlab_mysql:
docker.running:
- name: mysql
- binds:
/opt/mysql/data: /var/lib/mysql
- require:
- docker: gitlab_mysql_container
{{ pillar['mysql']['login']['uname'] }}:
mysql_user.present:
- host: 172.17.%.%
- password: {{ pillar['mysql']['login']['passwd'] }}
- connection_host: {{ salt['cmd.run']("docker inspect mysql | grep IPAddres | awk -F '\"' '{print $4}'") }}
- connection_user: root
- require:
- docker: gitlab_mysql
- pkg: python-mysqldb
- sls: gitlab
local:
Data failed to compile:
----------
Rendering SLS 'base:mysql-setup' failed: Unknown yaml render error; line 8
---
[...]
gitlab:
mysql_user.present:
- host: 172.17.%.%
- password: H54viC0z2ZHivaGMQnV7gz07b
- connection_host: Error: No such image or container: mysql <======================
- connection_user: root
- require:
- docker: gitlab_mysql
- pkg: python-mysqldb
- sls: gitlab
[...]
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment