我有一个非常简单的用例,我正在尝试着手:
我需要从 master 下载并安装一些 tar.gz 源包,然后运行一个脚本来编译和安装它们。
我意识到这可能是一个基本问题,但任何指针将不胜感激。
/usr/local/src/source1.tar.gz:
file.managed:
- source: salt://sources/source1.tar.gz
- user: root
- group: root
- mode: 644
/usr/local/src/source2.tar.gz:
file.managed:
- source: salt://sources/source2.tar.gz
- user: root
- group: root
- mode: 644
/usr/local/src/source3.tar.gz:
file.managed:
- source: salt://sources/source3.tar.gz
- user: root
- group: root
- mode: 644
//I need something like this, but am not sure how to do it
compile_and_install:
- require: /usr/local/src/source1.tar.gz
- require: /usr/local/src/source2.tar.gz
- require: /usr/local/src/source3.tar.gz
cmd.script:
- source: salt://scripts/compile_and_install.sh
- user: root
- group: root
- shell: /bin/bash