Skip to content
Snippets Groups Projects
Commit 63d219db authored by Sören Peters's avatar Sören Peters
Browse files

Remove unused ansible.

parent add775e6
No related branches found
No related tags found
1 merge request!300Feature/remove ansible
[defaults]
host_key_checking=False
[gitlab_ci_deploy_targets]
phoenix.hlr.rz.tu-bs.de ansible_ssh_private_key_file=./private_key
[gitlab_ci_deploy_cppcheck]
elladan.irmb.bau.tu-bs.de
[gitlab_ci_deploy_gcov]
elladan.irmb.bau.tu-bs.de
[gitlab_ci_deploy_wheel]
finrod.irmb.bau.tu-bs.de ansible_ssh_private_key_file=~/private_key ansible_become_password="{{ lookup('env', 'ANSIBLE_JUPYTER_HOST_BECOME_PASSWORD') }}"
\ No newline at end of file
- hosts: gitlab_ci_deploy_wheel
vars:
host_home: "/home/{{ lookup('env', 'jupyter_host') }}"
tasks:
- name: Find container IDs with image name
become: yes
shell: docker ps -a --format {% raw %}'{{.ID}} {{.Image}}'{% endraw %} | grep pyfluids-jupyter | awk '{ print $1 }'
register: container_ids
- name: Stop and remove docker spawner containers
become: yes
community.general.docker_container:
name: "{{ item }}"
state: absent
loop: "{{ container_ids.stdout_lines }}"
- name: Remove old docker spawner image
become: yes
community.general.docker_image:
name: pyfluids-jupyter
state: absent
- name: Find pyfluids wheel
find:
path: "{{ host_home }}/jupyterhub/DockerSpawnerImage/wheels/"
patterns: pyfluids*.whl
register: find_pyfluids
- name: Remove old pyfluids wheel
file:
path: "{{ item }}"
state: absent
loop: "{{ find_pyfluids.files }}"
- name: Copy new wheels to docker spawner image
synchronize:
src: ../dist/
dest: "{{ host_home }}/jupyterhub/DockerSpawnerImage/wheels/"
rsync_opts:
- "--include='*.whl'"
- name: Build docker spawner image again
become: yes
community.general.docker_image:
name: pyfluids-jupyter
source: build
build:
dockerfile: "{{ host_home }}/jupyterhub/DockerSpawnerImage/Dockerfile"
path: "{{ host_home }}/jupyterhub/DockerSpawnerImage/"
- hosts: gitlab_ci_deploy_targets
tasks:
- name: Create remote VirtualFluids_dev dir
command: mkdir ~/VirtualFluids_dev
ignore_errors: yes
- name: Synchronize VirtualFluids_dev with remote
synchronize:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
rsync_opts:
- "--exclude=.venv"
- "--exclude=__pycache__"
loop:
- { src: '../3rdParty', dest: '~/VirtualFluids_dev/3rdParty' }
- { src: '../apps', dest: '~/VirtualFluids_dev/apps' }
- { src: '../CMake', dest: '~/VirtualFluids_dev/CMake' }
- { src: '../Containers', dest: '~/VirtualFluids_dev/Containers' }
- { src: '../Python', dest: '~/VirtualFluids_dev/Python' }
- { src: '../src', dest: '~/VirtualFluids_dev/src' }
- { src: '../.clang-format', dest: '~/VirtualFluids_dev/.clang-format' }
- { src: '../.clang-tidy', dest: '~/VirtualFluids_dev/.clang-tidy' }
- { src: '../CMakeLists.txt', dest: '~/VirtualFluids_dev/CMakeLists.txt' }
- { src: '../cpu.cmake', dest: '~/VirtualFluids_dev/cpu.cmake' }
- { src: '../gpu.cmake', dest: '~/VirtualFluids_dev/gpu.cmake' }
- { src: '../pyproject.toml', dest: '~/VirtualFluids_dev/pyproject.toml' }
- { src: '../setup.py', dest: '~/VirtualFluids_dev/setup.py' }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment