This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
tsg-tsg-os-buildimage/ansible/roles/traffic-engine/tasks/main.yml

91 lines
2.7 KiB
YAML

---
- name: "create /var/lib/rancher/k3s/server/static/charts/"
file:
path: /var/lib/rancher/k3s/server/static/charts/
state: directory
- name: "create unarchive directory"
file:
path: "/tmp/helm/"
state: directory
- name: "copy chart directory to dest"
copy:
src: "{{ role_path }}/files/helm"
dest: /tmp/traffic-engine/
- name: "install helm: unarchive helm tar package"
unarchive:
src: "{{ role_path }}/files/helm-linux-amd64.tar.gz"
dest: /tmp/helm/
- name: "install helm: copy helm to dest"
copy:
src: "/tmp/helm/linux-amd64/helm"
dest: /usr/bin/helm
mode: 0755
remote_src: yes
- name: "create charts packages"
shell: helm package --app-version {{os_release_ver}} --version {{helm_chart_ver}} -d /var/lib/rancher/k3s/server/static/charts/ /tmp/traffic-engine/helm
- name: "copy kubeconfig.sh to destination"
copy:
src: "{{ role_path }}/files/kubeconfig.sh"
dest: /etc/profile.d/
mode: 0755
- name: "install tmpfiles.d for clean log"
copy:
src: "{{ role_path }}/files/tmpfiles.d/traffic-engine.conf"
dest: /usr/lib/tmpfiles.d/
- name: "install sudoers.d for sudo helm"
copy:
src: "{{ role_path }}/files/sudoers.d/00-kubconfig"
dest: /etc/sudoers.d/
- name: "mkdir hotfix directory"
file:
path: "{{ item }}"
state: directory
with_items:
- /etc/traffic-engine/hotfix/firewall/scripts
- /etc/traffic-engine/hotfix/firewall/files
- /etc/traffic-engine/hotfix/proxy/scripts
- /etc/traffic-engine/hotfix/proxy/files
- /etc/traffic-engine/hotfix/certstore/scripts
- /etc/traffic-engine/hotfix/certstore/files
- name: "copy prestart.sh"
copy:
src: '{{ role_path }}/files/hotfix/prestart.sh'
dest: '{{ item }}'
with_items:
- /etc/traffic-engine/hotfix/firewall/scripts/
- /etc/traffic-engine/hotfix/proxy/scripts/
- /etc/traffic-engine/hotfix/certstore/scripts/
- name: "copy clusterrole file to dest"
copy:
src: "{{ role_path }}/files/service-read-role.yaml"
dest: /var/lib/rancher/k3s/server/manifests/
when: runtime_env == 'TSG-X-P0906'
- name: "copy reloader crd file to dest"
copy:
src: "{{ role_path }}/files/reloader/reloader-crd.yaml"
dest: /var/lib/rancher/k3s/server/manifests/
- name: "copy reloader chart to dest"
copy:
src: "{{ role_path }}/files/reloader/reloader-v1.0.22.tgz"
dest: /var/lib/rancher/k3s/server/static/charts/
- name: "Get reloader chart images to dest"
get_url:
url: https://repo.geedge.net/filerepo/install/release/tsg-container-images/reloader.tar
dest: /var/lib/rancher/k3s/agent/images/reloader.tar
url_username: "{{ lookup('env', 'PULP_REPO_USERNAME') }}"
url_password: "{{ lookup('env', 'PULP_REPO_PASSWORD') }}"