Commit b48b4b54 authored by nanahira's avatar nanahira

cockpit

parent fbc4e96d
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
- hosts: hypervisor - hosts: hypervisor
remote_user: root remote_user: root
tasks: tasks:
- name: authorized_key
authorized_key:
user: "{{ ansible_user_id }}"
key: "{{ webvirt_ssh_key }}"
- name: get cpufreq policy path - name: get cpufreq policy path
find: find:
paths: paths:
...@@ -26,7 +22,7 @@ ...@@ -26,7 +22,7 @@
apt: apt:
state: latest state: latest
update_cache: true update_cache: true
name: qemu,qemu-kvm,libvirt-bin,bridge-utils,virtinst,libguestfs-tools,ksmtuned name: qemu,qemu-kvm,libvirt-bin,bridge-utils,virtinst,libguestfs-tools,ksmtuned,dmidecode,cockpit
- name: python for focal - name: python for focal
become: true become: true
when: ansible_os_family == 'Debian' and ansible_distribution_release == 'focal' when: ansible_os_family == 'Debian' and ansible_distribution_release == 'focal'
...@@ -49,7 +45,7 @@ ...@@ -49,7 +45,7 @@
yum: yum:
state: latest state: latest
update_cache: true update_cache: true
name: sudo,python,kvm,qemu-kvm,qemu-kvm-tools,qemu-img,libvirt,libvirt-python,libguestfs-tools,bridge-utils,virt-install,python-lxml name: sudo,python,kvm,qemu-kvm,qemu-kvm-tools,qemu-img,libvirt,libvirt-python,libguestfs-tools,bridge-utils,virt-install,python-lxml,dmidecode,cockpit
- name: epel 8 - name: epel 8
become: true become: true
dnf: dnf:
...@@ -61,7 +57,7 @@ ...@@ -61,7 +57,7 @@
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int >= 8 when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int >= 8
dnf: dnf:
state: latest state: latest
name: sudo,python3,qemu-kvm,qemu-img,libvirt,python3-libvirt,libguestfs-tools,virt-install,python3-lxml name: sudo,python3,qemu-kvm,qemu-img,libvirt,python3-libvirt,libguestfs-tools,virt-install,python3-lxml,dmidecode,cockpit
- name: libvirt service - name: libvirt service
become: true become: true
systemd: systemd:
...@@ -104,3 +100,26 @@ ...@@ -104,3 +100,26 @@
- iso - iso
- img - img
- xml - xml
- name: cockpit cert
become: true
copy:
content: |
{{ lookup('file', '../certs/{{cockpit_cert_domain}}/fullchain.pem') }}
{{ lookup('file', '../certs/{{cockpit_cert_domain}}/privkey.pem') }}
dest: /etc/cockpit/ws-certs.d/0-self-signed.cert
owner: root
group: cockpit-ws
mode: 0640
notify: restart_cockpit
- name: start cockpit
become: true
systemd:
name: cockpit
state: started
enabled: yes
handlers:
- name: restart_cockpit
become: true
systemd:
name: cockpit
state: restarted
---
- hosts: node
remote_user: root
roles:
- name: nodejs
vars:
nodejs_version: 12
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment