improve idempotency with changed_when/failed_when, args creates
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
chdir: 'c:\vagrant\scripts'
|
||||
register: palantir_wef
|
||||
failed_when: "'Exception' in palantir_wef.stdout"
|
||||
changed_when: "' already exists. Moving On.' not in palantir_wef.stdout"
|
||||
|
||||
- debug: msg="{{ palantir_wef.stdout_lines }}"
|
||||
|
||||
@@ -15,6 +16,7 @@
|
||||
chdir: 'c:\vagrant\scripts'
|
||||
register: install_osquery
|
||||
failed_when: "'Exception' in install_osquery.stdout"
|
||||
changed_when: "' already installed. Moving On.' not in install_osquery.stdout"
|
||||
|
||||
- debug: msg="{{ install_osquery.stdout_lines }}"
|
||||
|
||||
@@ -24,6 +26,7 @@
|
||||
chdir: 'c:\vagrant\scripts'
|
||||
register: sysinternals
|
||||
failed_when: "'Exception' in sysinternals.stdout"
|
||||
changed_when: "'Tools directory exists, no need to re-install.' not in sysinternals.stdout"
|
||||
|
||||
- debug: msg="{{ sysinternals.stdout_lines }}"
|
||||
|
||||
@@ -33,6 +36,7 @@
|
||||
chdir: 'c:\vagrant\scripts'
|
||||
register: velociraptor
|
||||
failed_when: "'Exception' in velociraptor.stdout"
|
||||
changed_when: "' already installed. Moving On.' not in velociraptor.stdout"
|
||||
|
||||
- debug: msg="{{ velociraptor.stdout_lines }}"
|
||||
|
||||
@@ -42,6 +46,7 @@
|
||||
chdir: 'c:\vagrant\scripts'
|
||||
register: autorunstowineventlog
|
||||
failed_when: "'Exception' in autorunstowineventlog.stdout"
|
||||
changed_when: "' already installed. Moving On.' not in autorunstowineventlog.stdout"
|
||||
|
||||
- debug: msg="{{ autorunstowineventlog.stdout_lines }}"
|
||||
|
||||
@@ -51,6 +56,7 @@
|
||||
chdir: 'c:\vagrant\scripts'
|
||||
register: redteam
|
||||
failed_when: "'Exception' in redteam.stdout"
|
||||
changed_when: "' already installed. Moving On.' not in redteam.stdout"
|
||||
|
||||
- debug: msg="{{ redteam.stdout_lines }}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user