Add argument to find the ansible files.
This commit is contained in:
parent
5dc94a6d69
commit
33362af07c
|
|
@ -48,5 +48,7 @@ spec:
|
||||||
params:
|
params:
|
||||||
- name: deploy
|
- name: deploy
|
||||||
value: $(params.deploy)
|
value: $(params.deploy)
|
||||||
|
- name: ansible-file-path
|
||||||
|
value: .
|
||||||
taskRef:
|
taskRef:
|
||||||
name: j7s-ansible-build
|
name: j7s-ansible-build
|
||||||
|
|
@ -8,6 +8,7 @@ spec:
|
||||||
- name: ssh-directory
|
- name: ssh-directory
|
||||||
params:
|
params:
|
||||||
- name: deploy
|
- name: deploy
|
||||||
|
- name: ansible-file-path
|
||||||
steps:
|
steps:
|
||||||
- image: 192.168.1.128:8443/ansible-podman:latest
|
- image: 192.168.1.128:8443/ansible-podman:latest
|
||||||
securityContext:
|
securityContext:
|
||||||
|
|
@ -20,7 +21,7 @@ spec:
|
||||||
chmod -R 400 ~/.ssh/*
|
chmod -R 400 ~/.ssh/*
|
||||||
|
|
||||||
cd $(workspaces.source.path)
|
cd $(workspaces.source.path)
|
||||||
ansible-playbook -vvvv --skip-tags deploy -i inventory.yaml build.yaml
|
ansible-playbook -vvvv --skip-tags deploy -i $(params.ansible-file-path)/inventory.yaml $(params.ansible-file-path)/build.yaml
|
||||||
|
|
||||||
if [[ $(params.deploy) == "true" ]]; then
|
if [[ $(params.deploy) == "true" ]]; then
|
||||||
ansible-playbook -vvvv --tags deploy -i inventory.yaml build.yaml
|
ansible-playbook -vvvv --tags deploy -i inventory.yaml build.yaml
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue