.github/workflows/setup-k3s-with-existed-vhost.yml: update

This commit is contained in:
Haitao Pan 2023-05-16 00:55:17 +08:00
parent 8fedfe4852
commit d6c3d2f2c6
2 changed files with 8 additions and 16 deletions

View File

@ -49,8 +49,8 @@ jobs:
common-gitlab.apollo-ev.com ansible_host=47.91.19.2
[all:vars]
ansible_port=8022
ansible_ssh_user=ubuntu
ansible_port=22
ansible_ssh_user=root
ansible_ssh_private_key_file=~/.ssh/id_rsa
ansible_host_key_checking=False
dns_ak=$DNS_AK

View File

@ -1,23 +1,15 @@
- name: Remove fluent-bit service
shell: "systemctl disable fluent-bit && systemctl stop fluent-bit"
when: inventory_hostname in groups[group]
- name: Pre setting
shell: "rm -f /usr/bin/promtail; mkdir -pv /etc/promtail/ && touch /var/log/positions.yaml"
when: inventory_hostname in groups[group]
- name: Download promtail binary
shell: 'curl -Lo /usr/bin/promtail https://mirrors.onwalk.net/tools/linux-amd64/promtail && chmod 755 /usr/bin/promtail'
when: inventory_hostname in groups[group]
- name: Create promtail-agent service
template: src=templates/promtail-agent.service dest=/lib/systemd/system/promtail-agent.service owner=root group=root mode=0644
when: inventory_hostname in groups[group]
- name: Create promtail-agent config
template: src=templates/promtail.yaml dest=/etc/promtail/promtail.yaml owner=root group=root mode=0644
when: inventory_hostname in groups[group]
- name: Init promtail-agent service
shell: "systemctl enable promtail-agent && systemctl daemon-reload && systemctl restart promtail-agent"
- name: Init Xtls service
shell: 'bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @install'
when: inventory_hostname in groups[group]
- name: Remove fluent-bit service
shell: "systemctl disable fluent-bit && systemctl stop fluent-bit"
when: inventory_hostname in groups[group]