Module - tripleo_diff_exec¶
This module provides for the following ansible plugin:
Takes a file path and compares it to a previous version (created by this module) and runs a command if the contents are different.
Command to run if the state file has changed since the last run. If the previous version of the state file does not exist, the command is run.
Environment variables to be passed to the command being run
List of valid return code values for the command
File to use to compare to the previous version
Suffix to use to store the previous version of the file for comparisons between runs
Alex Schultz (@mwhahaha)
- name: Run command if file is changed tripleo_diff_exec: command: systemctl restart foo.service state_file: /var/lib/my-file state_file_suffix: -foo environment: FOO: bar