Jérémy Lecour
00fe225a3c
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|2615|7|2608|177|:+1:
Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/278//ansiblelint">Evolix » ansible-roles » unstable #278</a>
gitea/ansible-roles/pipeline/head This commit looks good
67 lines
1.5 KiB
YAML
67 lines
1.5 KiB
YAML
---
|
|
|
|
- name: remove old package
|
|
ansible.builtin.apt:
|
|
name: kvm-tools
|
|
purge: yes
|
|
state: absent
|
|
|
|
- ansible.builtin.include_role:
|
|
name: remount-usr
|
|
when: kvm_scripts_dir is search("/usr")
|
|
|
|
- name: add-vm script is present
|
|
ansible.builtin.copy:
|
|
src: add-vm.sh
|
|
dest: "{{ kvm_scripts_dir }}/add-vm"
|
|
mode: "0700"
|
|
owner: root
|
|
group: root
|
|
force: true
|
|
|
|
- name: migrate-vm script is present
|
|
ansible.builtin.copy:
|
|
src: migrate-vm.sh
|
|
dest: "{{ kvm_scripts_dir }}/migrate-vm"
|
|
mode: "0700"
|
|
owner: root
|
|
group: root
|
|
force: true
|
|
|
|
- name: kvmstats script is present
|
|
ansible.builtin.copy:
|
|
src: kvmstats.sh
|
|
dest: "{{ kvm_scripts_dir }}/kvmstats"
|
|
mode: "0700"
|
|
owner: root
|
|
group: root
|
|
force: true
|
|
|
|
- name: kvmstats cron is present
|
|
ansible.builtin.template:
|
|
src: kvmstats.cron.j2
|
|
dest: "/etc/cron.hourly/kvmstats"
|
|
mode: "0755"
|
|
owner: root
|
|
group: root
|
|
|
|
- name: entry for kvmstats in web page is present
|
|
ansible.builtin.lineinfile:
|
|
dest: /var/www/index.html
|
|
insertbefore: '</ul>'
|
|
line: '<li><a href="/kvmstats.html">kvmstats</a></li>'
|
|
|
|
|
|
# backward compatibility
|
|
|
|
- name: remove old migrate-vm script
|
|
ansible.builtin.file:
|
|
path: /usr/share/scripts/migrate-vm
|
|
state: absent
|
|
when: "'/usr/share/scripts' not in kvm_scripts_dir"
|
|
|
|
- name: remove old kvmstats script
|
|
ansible.builtin.file:
|
|
path: /usr/share/scripts/kvmstats
|
|
state: absent
|
|
when: "'/usr/share/scripts' not in kvm_scripts_dir" |