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
2023-02-09 16:35:52 +08:00

75 lines
2.1 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'