Advertisement
Guest User

Untitled

a guest
Jan 14th, 2014
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. $ cat /etc/salt/files/base/env_ops.sls:
  2. ops-repo-master:
  3. cloud.present:
  4. - name: ops-repo-master
  5. - profile: ops_box_micro
  6. - provider: ops
  7.  
  8. $ cat /etc/salt/cloud.profiles.d/ops.conf
  9. ops_box_micro:
  10. provider: ops
  11. image: ami-c30360aa
  12. size: Micro Instance
  13. ssh_username: ubuntu
  14. rename_on_destroy: True
  15. delvol_on_destroy: True
  16.  
  17. There's a matching ops provider in /etc/salt/cloud.providers.d which I won't quote here as it has AWS keys etc.
  18.  
  19. This works:
  20.  
  21. $ salt-run cloud.profile ops_box_micro ops-repo-master
  22. ...stuff
  23.  
  24. This FAILS:
  25.  
  26. $ salt-run state.sls env_ops
  27. [ERROR ] Failed to create VM ops-repo-master. Configuration value 'image' needs to bt
  28. Traceback (most recent call last):
  29. File "/usr/local/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 802, in ce
  30. output = self.clouds[func](vm_)
  31. File "/usr/local/lib/python2.7/dist-packages/salt/cloud/clouds/ec2.py", line 907, ine
  32. image_id = vm_['image']
  33. KeyError: 'image'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement