回答編集履歴
1
1
answer
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
> シンボリックの場合処理をスキップするようにしたいのですが、Ansibleでシンボリックか否かを判断することは可能でしょうか。
|
2
2
|
|
3
|
-
はい、
|
3
|
+
はい、可能です。
|
4
|
+
Ansibleでは [statモジュール](https://docs.ansible.com/ansible/latest/modules/stat_module.html) と [その戻り値(`stat.islnk`)](https://docs.ansible.com/ansible/latest/modules/stat_module.html#return-values)、 [whenステートメント](https://docs.ansible.com/ansible/latest/user_guide/playbooks_conditionals.html#the-when-statement) を使います。
|
4
5
|
[examples](https://docs.ansible.com/ansible/latest/modules/stat_module.html#examples) にサンプルコードがありますのでそちらを参考にしてみてください。
|