vielleicht kann der eine oder andere von uns das hier noch gebrauchen:
Ein Ansible-Playbook, welches den bereits vorhandenen opsi-4.0.7-Depotserver auf 4.1 upgraded:
Code: Alles auswählen
---
- hosts: OPSI-Depotserver
become: true
tasks:
- name: 1. New OPSI-Repository
apt_repository:
repo: deb http://download.opensuse.org/repositories/home:/uibmz:/opsi:/4.1:/stable/xUbuntu_16.04/ /
state: present
- name: 2. Release Key adden
apt_key:
id: D8361F81
url: https://download.opensuse.org/repositories/home:uibmz:opsi:4.1:stable/xUbuntu_16.04/Release.key
state: present
- name: 3. Remove Inetd-tftp
shell: update-inetd --remove tftp
- name: 4. Install opsi-tftpd-hpa
apt:
name: opsi-tftpd-hpa
update_cache: yes
- name: 5. Update all packages to the latest version
apt:
upgrade: dist
- name: 6. Install opsi-server
apt:
name: opsi-server
update_cache: yes
# - name: 6. Update MySQL Backend
# shell: opsi-setup --update-mysql
- name: 7. Update MySQL Backend
shell: opsi-setup --update-file
- name: 8. Init Current Config
shell: opsi-setup --init-current-config
- name: 9. Restart service opsiconfd.service, in all cases
service:
name: opsiconfd
state: restarted
- name: 10. Restart service opsipxeconfd.service, in all cases
service:
name: opsipxeconfd
state: restarted
- name: 11. Migrate Product Updater Config
shell: opsi-migrate-product-updater-configuration --disable-repos
- name: 12. Opsi Product Updater
shell: opsi-package-updater -v update
- name: Remove "opsi-depotserver" package
apt:
name: opsi-depotserver
state: absent