Commit 7a806923 authored by nanahira's avatar nanahira

fix ubuntu 22

parent e5a6910f
...@@ -5,14 +5,17 @@ ...@@ -5,14 +5,17 @@
- name: cockpit cert - name: cockpit cert
become: true become: true
copy: copy:
content: | src: '../certs/{{cockpit_cert_domain}}/{{item.file}}'
{{ lookup('file', '../certs/{{cockpit_cert_domain}}/fullchain.pem') }} dest: /etc/cockpit/ws-certs.d/0-self-signed.{{item.suffix}}
{{ lookup('file', '../certs/{{cockpit_cert_domain}}/privkey.pem') }}
dest: /etc/cockpit/ws-certs.d/0-self-signed.cert
owner: root owner: root
group: cockpit-ws group: cockpit-ws
mode: 0640 mode: 0640
notify: restart_cockpit notify: restart_cockpit
with_items:
- file: cert.pem
suffix: cert
- file: privkey.pem
suffix: key
- name: start cockpit - name: start cockpit
become: true become: true
systemd: systemd:
......
...@@ -35,12 +35,12 @@ ...@@ -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: 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 - name: packages for focal
become: true 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: apt:
name: python-is-python3 name: python-is-python3
- name: packages for non-focal - name: packages for non-focal
become: true 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: apt:
name: python,python-libvirt,python-lxml name: python,python-libvirt,python-lxml
- name: epel 7 - name: epel 7
...@@ -113,20 +113,17 @@ ...@@ -113,20 +113,17 @@
- name: cockpit cert - name: cockpit cert
become: true become: true
copy: copy:
content: | src: '../certs/{{cockpit_cert_domain}}/{{item.file}}'
{{ lookup('file', '../certs/{{cockpit_cert_domain}}/fullchain.pem') }} dest: /etc/cockpit/ws-certs.d/0-self-signed.{{item.suffix}}
{{ lookup('file', '../certs/{{cockpit_cert_domain}}/privkey.pem') }}
dest: /etc/cockpit/ws-certs.d/0-self-signed.cert
owner: root owner: root
group: cockpit-ws group: cockpit-ws
mode: 0640 mode: 0640
notify: restart_cockpit notify: restart_cockpit
- name: start cockpit with_items:
become: true - file: cert.pem
systemd: suffix: cert
name: cockpit - file: privkey.pem
state: started suffix: key
enabled: yes
handlers: handlers:
- name: restart_cockpit - name: restart_cockpit
become: true 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