質問編集履歴

4

一部 修正しました

2022/10/24 06:43

投稿

hap_cmd
hap_cmd

スコア3

test CHANGED
File without changes
test CHANGED
@@ -40,7 +40,7 @@
40
40
  diff: yes
41
41
  # register: result
42
42
  with_items:
43
- # "{{ copy_sender }}"
43
+ # "{{ copy }}"
44
44
  - { src: dir/dir-A/test, dest: dir/dir-X/test }
45
45
  - { src: dir/dir-B/test, dest: dir/dir-Y/test }
46
46
  register: result

3

修正しました

2022/09/21 04:34

投稿

hap_cmd
hap_cmd

スコア3

test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,11 @@
1
- ローカルにあるファイルAをリモート側のサーバに同じファイル名としてコピーした後
1
+ ローカルにあるファイルをリモート側のサーバに同じファイル名としてコピーした後
2
2
  ファイル内容が更新された事を確認して
3
3
  反映コマンドを実行させる事が目的です
4
+
5
+ 前提として、下記のようなディレクトリ・ファイル構成となります
6
+ ローカル側の dir/dir-A/test リモート側の dir/dir-X/test と紐づきます
7
+ ローカル側の dir/dir-B/test リモート側の dir/dir-Y/test  と紐づきます
8
+
4
9
 
5
10
  今、試している事として
6
11
  copyモジュール実行タスクにおいてファイル内容をdiffした結果をregisterに

2

修正しました

2022/09/21 02:09

投稿

hap_cmd
hap_cmd

スコア3

test CHANGED
File without changes
test CHANGED
@@ -51,8 +51,8 @@
51
51
  when: result.follow == 'false'
52
52
  # when: result.changed == true
53
53
  with_items:
54
- - dir-A
54
+ - dir-X
55
- - dir-B
55
+ - dir-Y
56
56
 
57
57
  tags: copy_test
58
58
 

1

修正

2022/09/18 05:32

投稿

hap_cmd
hap_cmd

スコア3

test CHANGED
File without changes
test CHANGED
@@ -58,5 +58,5 @@
58
58
 
59
59
  ```
60
60
 
61
- copyモジュールで更新したファイルがあれば、run command実行させるにはどのようにすればよろしいかご教示願います
61
+ copyモジュールで更新したファイルがあれば、更新したファイルがあるディレクトリ配下にあるファイルを対象のみに、run command実行させるにはどのようにすればよろしいかご教示願います
62
62