Commit 7a806923 authored by nanahira's avatar nanahira

fix ubuntu 22

parent e5a6910f
......@@ -5,14 +5,17 @@
- 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
src: '../certs/{{cockpit_cert_domain}}/{{item.file}}'
dest: /etc/cockpit/ws-certs.d/0-self-signed.{{item.suffix}}
owner: root
group: cockpit-ws
mode: 0640
notify: restart_cockpit
with_items:
- file: cert.pem
suffix: cert
- file: privkey.pem
suffix: key
- name: start cockpit
become: true
systemd:
......
......@@ -35,12 +35,12 @@
name: qemu,qemu-kvm,bridge-utils,virtinst,libguestfs-tools,ksmtuned,dmidecode,cockpit,cockpit-machines,libvirt-daemon,libvirt-dev,python3,python3-libvirt,python3-lxml,ovmf
- name: packages for focal
become: true
when: ansible_os_family == 'Debian' and ansible_distribution_release == 'focal'
when: ansible_os_family == 'Debian' and (ansible_distribution == 'Debian' and ansible_distribution_major_version|int >= 11 or ansible_distribution == 'Ubuntu' and ansible_distribution_major_version|int >= 20)
apt:
name: python-is-python3
- name: packages for non-focal
become: true
when: ansible_os_family == 'Debian' and ansible_distribution_release != 'focal'
when: ansible_os_family == 'Debian' and not (ansible_distribution == 'Debian' and ansible_distribution_major_version|int >= 11 or ansible_distribution == 'Ubuntu' and ansible_distribution_major_version|int >= 20)
apt:
name: python,python-libvirt,python-lxml
- name: epel 7
......@@ -113,20 +113,17 @@
- 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
src: '../certs/{{cockpit_cert_domain}}/{{item.file}}'
dest: /etc/cockpit/ws-certs.d/0-self-signed.{{item.suffix}}
owner: root
group: cockpit-ws
mode: 0640
notify: restart_cockpit
- name: start cockpit
become: true
systemd:
name: cockpit
state: started
enabled: yes
with_items:
- file: cert.pem
suffix: cert
- file: privkey.pem
suffix: key
handlers:
- name: restart_cockpit
become: true
......
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