How can i run ansible command if certain file changed
问题 I am using ansible to deploy my django App using - name: Upgrade the virtualenv. pip: requirements={{project_root}}/www/requirements.txt virtualenv={{project_root}}/www/virtualenv But i only want to run that if requirements.txt changed since last run 回答1: We need to determine if any of the requirement files have changed. The steps are as follows: Touch the temp requirement files. (If they didn't exist, the md5 will be different for the new blank file) Calculate the md5 hash of the previous