Created
August 13, 2020 05:10
-
-
Save krdlab/2c8dde9b43068a07c318efaa25a40b32 to your computer and use it in GitHub Desktop.
Ansible を使ってリモートホスト上に指定のファイルが生成されるまで待つ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: targets | |
become: yes | |
tasks: | |
- name: Get UTC date | |
command: date -u '+%Y-%m-%d' | |
check_mode: no | |
changed_when: no | |
register: utc_date | |
- debug: | |
var: utc_date | |
- name: Wait for target started | |
wait_for: | |
path: "/var/log/target/foo.bar.{{ utc_date.stdout }}.log" | |
state: present |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment