Make container storage repository configurable (#4284)
This commit is contained in:
parent
b07641c3f3
commit
7dfa39483f
3 changed files with 12 additions and 6 deletions
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
docker_container_storage_setup_repository: https://github.com/projectatomic/container-storage-setup.git
|
||||||
docker_container_storage_setup_version: v0.6.0
|
docker_container_storage_setup_version: v0.6.0
|
||||||
docker_container_storage_setup_profile_name: kubespray
|
docker_container_storage_setup_profile_name: kubespray
|
||||||
docker_container_storage_setup_storage_driver: devicemapper
|
docker_container_storage_setup_storage_driver: devicemapper
|
||||||
|
|
|
@ -2,14 +2,15 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
version=${1:-master}
|
repository=${1:-https://github.com/projectatomic/container-storage-setup.git}
|
||||||
profile_name=${2:-kubespray}
|
version=${2:-master}
|
||||||
|
profile_name=${3:-kubespray}
|
||||||
dir=`mktemp -d`
|
dir=`mktemp -d`
|
||||||
export GIT_DIR=$dir/.git
|
export GIT_DIR=$dir/.git
|
||||||
export GIT_WORK_TREE=$dir
|
export GIT_WORK_TREE=$dir
|
||||||
|
|
||||||
git init
|
git init
|
||||||
git fetch --depth 1 https://github.com/projectatomic/container-storage-setup.git $version
|
git fetch --depth 1 $repository $version
|
||||||
git merge FETCH_HEAD
|
git merge FETCH_HEAD
|
||||||
make -C $dir install
|
make -C $dir install
|
||||||
rm -rf /var/lib/container-storage-setup/$profile_name $dir
|
rm -rf /var/lib/container-storage-setup/$profile_name $dir
|
||||||
|
|
|
@ -39,5 +39,9 @@
|
||||||
|
|
||||||
- name: docker-storage-setup | install and run container-storage-setup
|
- name: docker-storage-setup | install and run container-storage-setup
|
||||||
become: yes
|
become: yes
|
||||||
script: install_container_storage_setup.sh {{ docker_container_storage_setup_version }} {{ docker_container_storage_setup_profile_name }}
|
script: |
|
||||||
|
install_container_storage_setup.sh \
|
||||||
|
{{ docker_container_storage_setup_repository }} \
|
||||||
|
{{ docker_container_storage_setup_version }} \
|
||||||
|
{{ docker_container_storage_setup_profile_name }}
|
||||||
notify: Docker | reload systemd
|
notify: Docker | reload systemd
|
||||||
|
|
Loading…
Reference in a new issue