Bugfix: git stash (#157)
Bugfix: git stash Co-authored-by: Michael Grote <michael.grote@posteo.de> Reviewed-on: mg/ansible#157 Co-Authored-By: mg <mg@noreply.git.mgrote.net> Co-Committed-By: mg <mg@noreply.git.mgrote.net>
This commit is contained in:
parent
68d9bd0dbd
commit
fc0657747d
2 changed files with 0 additions and 16 deletions
|
@ -10,7 +10,6 @@
|
||||||
chdir: "{{ docker_compose_base_dir }}/{{ item.dir_name }}"
|
chdir: "{{ docker_compose_base_dir }}/{{ item.dir_name }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when: repo_exists.stat.exists == true
|
when: repo_exists.stat.exists == true
|
||||||
register: stashed
|
|
||||||
|
|
||||||
- name: clone public repository - "{{ item.name }}"
|
- name: clone public repository - "{{ item.name }}"
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
|
@ -18,13 +17,6 @@
|
||||||
dest: "{{ docker_compose_base_dir }}/{{ item.dir_name }}"
|
dest: "{{ docker_compose_base_dir }}/{{ item.dir_name }}"
|
||||||
register: repo
|
register: repo
|
||||||
|
|
||||||
- name: pop stashed changes
|
|
||||||
ansible.builtin.shell: git stash pop
|
|
||||||
args:
|
|
||||||
chdir: "{{ docker_compose_base_dir }}/{{ item.dir_name }}"
|
|
||||||
changed_when: false
|
|
||||||
when: stashed.changed
|
|
||||||
|
|
||||||
- name: (re)start container - "{{ item.name }}"
|
- name: (re)start container - "{{ item.name }}"
|
||||||
ansible.builtin.shell: docker-compose down && docker-compose up -d
|
ansible.builtin.shell: docker-compose down && docker-compose up -d
|
||||||
args:
|
args:
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
chdir: "{{ dotfiles_repo_path }}"
|
chdir: "{{ dotfiles_repo_path }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when: repo_exists.stat.exists == true
|
when: repo_exists.stat.exists == true
|
||||||
register: stashed
|
|
||||||
|
|
||||||
- name: Ensure dotfiles repository is cloned locally.
|
- name: Ensure dotfiles repository is cloned locally.
|
||||||
git:
|
git:
|
||||||
|
@ -25,13 +24,6 @@
|
||||||
depth: 1
|
depth: 1
|
||||||
register: git_clone
|
register: git_clone
|
||||||
|
|
||||||
- name: pop stashed changes
|
|
||||||
ansible.builtin.shell: git stash pop
|
|
||||||
args:
|
|
||||||
chdir: "{{ dotfiles_repo_path }}"
|
|
||||||
changed_when: false
|
|
||||||
when: stashed.changed
|
|
||||||
|
|
||||||
- name: set owner recursive for repo
|
- name: set owner recursive for repo
|
||||||
file:
|
file:
|
||||||
path: "{{ dotfiles_repo_path }}"
|
path: "{{ dotfiles_repo_path }}"
|
||||||
|
|
Loading…
Reference in a new issue