Skip to content

Instantly share code, notes, and snippets.

@jlund
Created May 30, 2013 22:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlund/5681831 to your computer and use it in GitHub Desktop.
Save jlund/5681831 to your computer and use it in GitHub Desktop.
Python Salt state source compilation example
#!/bin/bash
cd /usr/local/src/
tar xfj Python-3.3.2.tar.bz2
cd Python-3.3.2
./configure --prefix=/opt/python
make
make install
python-install:
cmd.script:
- name: salt://python/install.sh
- unless: /opt/python/bin/python -V | grep 3.3.2
- require:
- file: python-source
python-source:
file.managed:
- name: /usr/local/src/Python-3.3.2.tar.bz2
- source: http://python.org/ftp/python/3.3.2/Python-3.3.2.tar.bz2
- source_hash: sha256=f77202fe2bbc203205d7bd6e8452567fa1d9bc97f6957c9ef753d9a36cdcbe9a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment