File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ fworch_parent_dir: "/usr/local"
3636fworch_home : " {{ fworch_parent_dir }}/{{ product_name }}"
3737fworch_conf_dir : " {{ fworch_home }}/etc"
3838fworch_conf_file : " {{ fworch_conf_dir }}/fworch.json"
39+ last_commit_id_file_path : " {{ fworch_conf_dir }}/last_commit_id.txt"
3940fworch_secrets_dir : " {{ fworch_conf_dir }}/secrets"
4041importer_venv_dir : " {{ fworch_home }}/importer/importer-venv"
4142
Original file line number Diff line number Diff line change 1+ - block :
2+ - name : remove local copy of remote config file
3+ file :
4+ state : absent
5+ name : " temp_remote_config_file.json"
6+
7+ - name : get last commit id
8+ command : git rev-parse HEAD
9+ register : final_commit_id
10+ failed_when : false
11+ changed_when : false
12+
13+ # also handle case where we are not inside a git repo
14+ - name : determine commit id content
15+ set_fact :
16+ final_commit_id_value : " {{ final_commit_id.stdout if final_commit_id.rc == 0 else 'unknown' }}"
17+
18+ - name : write commit id to last_commit_id.txt file
19+ copy :
20+ content : " {{ final_commit_id_value }}"
21+ dest : " {{ last_commit_id_file_path }}"
22+
23+ become : true
Original file line number Diff line number Diff line change 279279 - name : include fworch.yaml config file creator
280280 import_tasks : conf_file_creator.yml
281281
282+ - name : include last_commit_id.txt file creator
283+ import_tasks : last_commit_id_file_creator.yml
284+
282285 - name : include upgrade script
283286 import_tasks : run-upgrades.yml
284287 when : " installation_mode == 'upgrade'"
You can’t perform that action at this time.
0 commit comments