devinit / grand-bargain-monitoring

Flask app to output a table showing stats about Grand Bargain signatories
MIT License
1 stars 4 forks source link

Deployment: Cannot rerun deploy.yml due to file permissions changes #40

Open dalepotter opened 7 years ago

dalepotter commented 7 years ago

Attempting to re-run the deployment/deploy.yml playbook after already installing causes an issue.

$ ansible-playbook deployment/deploy.yml -i deployment/inventory.ini

PLAY [gbm-server] **************************************************************

TASK [setup] *******************************************************************
ok: [gbm-server]

TASK [clone grand-bargain-monitoring git repository] ***************************
fatal: [gbm-server]: FAILED! => {"before": "2dce75cec5f852e689134fd6ac297400d15e8f24", "changed": false, "failed": true, "msg": "Local modifications exist in repository (force=no).", "warnings": []}
    to retry, use: --limit @/Users/dalepotter/Documents/grand-bargain-monitoring/deployment/deploy.retry

PLAY RECAP *********************************************************************
gbm-server                 : ok=1    changed=0    unreachable=0    failed=1  

This appears to be due to the fact that file permissions in /var/www when the playbook is first run - i.e. here: https://github.com/devinit/grand-bargain-monitoring/blob/deployment/deployment/deploy.yml#L67-L68

This change on the remote machine prevents git from attempting to re-clone the repo.

Suggestions

samuele-mattiuzzo commented 6 years ago

Just stumbled into this issue today as well, although it did not seem to cause any troubles