問題タブ [salt-stack]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
2 に答える
5645 参照

salt-stack - ソルト スタック - 構成ファイルの解析エラー: /etc/salt/master

私は塩を学ぼうとしています。面倒であることが証明されています。マスター構成を回避することさえできません。下の行の何が問題になっていますか?

0 投票する
1 に答える
1835 参照

directory-structure - SaltStack: Use directory as source only if it exists

I'd like to know if there's a way of running a SaltStack state only if a directory source is defined in the master.

Basically, I want to allow fo users to put certain configuration files in their HOME directory. Most of the users won't have anything special, but some of them might (a custom .vimrc, for instance)

What I'd like to do is execute a file.recurse for the user's HOMEdirectory only if that directory exists in master.

As of now, I have the following:

What I want to do is what in the code appears as the ToDo: If there's a directory salt://users/{{ username }} in the salt tree (or in the salt master), then execute the file.recurse with that directory as the source for the file.recurse. Otherwise, just skip that state and use with whatever default content of $HOME is has when a user is created (just do nothing, I mean).

I thought adding an onlyif clause to the file.recurse configuration (something like - onlyif: test -e salt://users/{{ username }} would help... but nopes... I also tried to create an empty directory in salt://users/empty_dir/ and pass it as a default (as described here for a file.managed), but that trick doesn't work with file.recurse (at least not yet):

Thank you in advance.

0 投票する
2 に答える
337 参照

debian - salt-minion に関する非推奨警告

2台のDebianマシン(Debian 8 - Jessy)にsalt-master(0.17.5)とsalt-minion(0.17.5)があります。

このコマンドを起動するとsalt '*' cp.get_file salt://file /file、salt-minion に次の警告が表示されます。

[WARNING] /usr/lib/.../minion.py:594: Deprecation Warning: Master pub message signing is disabled but we received a signature for this message. Most likely this means that your masters and minions are not the same version...

なぜこの警告が表示されるのですか?

0 投票する
1 に答える
666 参照

salt-stack - Salt-Stack は、require を意味します。

次のソルト状態があります。ウォッチはrequireを意味しますか? それとも、ルールはこのように書くのが最善でしょうか?

0 投票する
1 に答える
113 参照

django - 実行されている実際のコマンドに変換されたソルト状態を確認する方法はありますか?

私は次のような状態を持っています

ドキュメントは、これが正確に何をするかについてあまり具体的ではありませんが、実際にはdjango-admin.py syncdb --settings=mvod.dev_settings --migrate、ディレクトリ内からコマンドを実行するという意味で、私が期待することをしているようです/home/vagrant/virtualenv

/home/vagrant/virtualenv/パスを実際に に設定する必要があるため、これは実際には失敗します/home/vagrant/virtualenv/bin/django-admin.py

ただし、djangoがインストールされていない環境でこれを実行したため、これは失敗すると予想されます。ただし、状態は返さResult: Trueれましたが、出力はこれでしたIs a directory

それが私が呼ぼうとしていたものなので、行bin_env: /home/vagrant/virtualenv/を置き換える必要があることが最終的にわかりました。bin_env: /home/vagrant/virtualenv/bin/django-admin.py

結論:状態を実行中の正確なコマンドに変える方法があれば、もっと早くそれを理解できたでしょう。

それで、これを本当に速くする方法はありますか?

0 投票する
2 に答える
9107 参照

salt-stack - ソルト状態の途中で再起動する方法は?

(これは、salt-users グループ、FWIW で私が尋ねた質問のコピーです)

いくつかの Windows サーバー機能をインストールし、ミニオンを再起動して、さらにソフトウェアをインストールする状態を記述する必要があります。すべてのピース(cmd.wait、system.reboot)があるようですが、ドットを接続するのに問題があります。

たとえば、IIS をマシンにインストールすることになっている "webserver" 状態があります。一部のサーバー機能を有効にし、再起動 (Windows のため) してから続行する必要があります。これは、Web サイトをインストールできる「Web サイト」という名前のカスタム モジュールと、アプリケーション プールをインストールするための別のモジュールを使用して行います。状態ファイルは次のようになります。

「serverstate.webserver」要件と「apppool.static」要件の間で再起動を行う必要があるという事実を除いて、上記はうまく機能します。現状では、状態が失敗し、手動で再起動してから、状態を再実行すると機能します。当然、手動の再起動手順は省略したいと考えています。

この種の問題を解決するための一般的なパターンはありますか?