Update
This commit is contained in:
parent
d79f0cbeed
commit
336b830bba
@ -1,8 +0,0 @@
|
||||
# roles/webmin/defaults/main.yml
|
||||
webmin_repo_url: https://download.webmin.com
|
||||
webmin_dist: stable
|
||||
webmin_section: contrib
|
||||
|
||||
# Optional HTTP auth
|
||||
webmin_auth_user: javi
|
||||
webmin_auth_pass: password
|
@ -1,66 +0,0 @@
|
||||
---
|
||||
- name: Remove any old/malformed Webmin sources list
|
||||
ansible.builtin.file:
|
||||
path: /etc/apt/sources.list.d/webmin.list
|
||||
state: absent
|
||||
|
||||
- name: Remove any old Webmin keyring
|
||||
ansible.builtin.file:
|
||||
path: /usr/share/keyrings/webmin-archive-keyring.gpg
|
||||
state: absent
|
||||
|
||||
- name: Install Webmin GPG key into its own keyring
|
||||
ansible.builtin.apt_key:
|
||||
url: https://download.webmin.com/developers-key.asc
|
||||
keyring: /usr/share/keyrings/webmin-archive-keyring.gpg
|
||||
state: present
|
||||
|
||||
- name: Add Webmin APT repository
|
||||
ansible.builtin.apt_repository:
|
||||
filename: webmin
|
||||
repo: >-
|
||||
deb [signed-by=/usr/share/keyrings/webmin-archive-keyring.gpg]
|
||||
https://download.webmin.com/download/repository
|
||||
sarge contrib
|
||||
state: present
|
||||
|
||||
- name: Ensure apt prerequisites are installed
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- curl
|
||||
- gnupg
|
||||
- apt-transport-https
|
||||
- ca-certificates
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Configure APT HTTP auth for Webmin
|
||||
when: webmin_auth_user is defined and webmin_auth_pass is defined
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/apt/auth.conf.d/webmin.conf
|
||||
mode: '0600'
|
||||
content: |
|
||||
machine {{ webmin_repo_url | regex_replace('^https?://','') }}
|
||||
login {{ webmin_auth_user }}
|
||||
password {{ webmin_auth_pass }}
|
||||
|
||||
- name: Remove old Webmin preference file
|
||||
ansible.builtin.file:
|
||||
path: /etc/apt/preferences.d/webmin-stable-package-priority
|
||||
state: absent
|
||||
|
||||
- name: Refresh apt cache
|
||||
ansible.builtin.apt:
|
||||
update_cache: true
|
||||
|
||||
- name: Install Webmin
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- webmin
|
||||
state: present
|
||||
|
||||
- name: Ensure Webmin service is enabled & started
|
||||
ansible.builtin.service:
|
||||
name: webmin
|
||||
state: started
|
||||
enabled: true
|
Loading…
x
Reference in New Issue
Block a user