次のようなものを実行するにはどうすればよいですか。
{% if not exist('/tmp/dummy/') then %}
dummy:
file.touch:
- name: /tmp/dummy/tmp.txt
...
{% endif %}
ZIP ファイルからソフトウェアをインストールするために必要です。ミニオンで解凍したいのですが、インストールにのみ必要なライセンス ファイルの残りを残したくありません。
次のようなものを実行するにはどうすればよいですか。
{% if not exist('/tmp/dummy/') then %}
dummy:
file.touch:
- name: /tmp/dummy/tmp.txt
...
{% endif %}
ZIP ファイルからソフトウェアをインストールするために必要です。ミニオンで解凍したいのですが、インストールにのみ必要なライセンス ファイルの残りを残したくありません。
ソルトには純粋な python レンダラーを使用できます。これがどのように見えるかです。
#!py
import os
def run():
# defines the hash config
config = {}
if (not os.path.isfile("/tmp/dummy")):
config["dummy"] = {
"file.touch": [
{'name': '/tmp/dummy'},
],
}
return config