Make vSphere scripts work for binary deploys

Fixes #1732.
This commit is contained in:
Pieter Noordhuis
2014-10-10 18:52:02 -07:00
parent 74998eead4
commit e90f98a52c
13 changed files with 467 additions and 334 deletions

View File

@@ -0,0 +1,9 @@
# This runs highstate on the ALL nodes.
#
# Used from the vSphere provider. The IP addresses of the minons are passed to
# the apiserver as arguments and every minion has static routes to every other
# minion. This means every node should be refreshed when a node is added.
#
highstate_run:
cmd.state.highstate:
- tgt: '*'

View File

@@ -1,6 +1,7 @@
pkg-core:
pkg.installed:
- names:
- curl
{% if grains['os_family'] == 'RedHat' %}
- python
- git

View File

@@ -17,6 +17,9 @@ nginx:
{% if grains.cloud == 'vagrant' %}
{% set cert_ip=grains.fqdn_ip4 %}
{% endif %}
{% if grains.cloud == 'vsphere' %}
{% set cert_ip=grains.ip_interfaces.eth0[0] %}
{% endif %}
{% endif %}
# If there is a pillar defined, override any defaults.
{% if pillar['cert_ip'] is defined %}
@@ -34,6 +37,8 @@ nginx:
- source: salt://nginx/{{certgen}}
{% if cert_ip is defined %}
- args: {{cert_ip}}
- require:
- pkg: curl
{% endif %}
- cwd: /
- user: root