fix service name on rocky8
Some checks reported errors
continuous-integration/drone/pr Build was killed
Some checks reported errors
continuous-integration/drone/pr Build was killed
This commit is contained in:
parent
0ea90a83ec
commit
1a0e26a998
@ -1,2 +1,14 @@
|
||||
---
|
||||
- include_vars: "{{ var_files }}"
|
||||
vars:
|
||||
var_files: "{{ lookup('first_found', params, errors='ignore') }}"
|
||||
params:
|
||||
files:
|
||||
- "{{ ansible_lsb.id | default('') | lower }}.yml"
|
||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version }}.yml"
|
||||
- "{{ ansible_os_family | lower }}.yml"
|
||||
paths:
|
||||
- "vars"
|
||||
when: var_files
|
||||
|
||||
- include_tasks: setup.yml
|
||||
|
@ -59,7 +59,7 @@
|
||||
|
||||
- name: Ensure openvpn service is up and running
|
||||
service:
|
||||
name: "openvpn@{{ openvpn_client_name }}"
|
||||
name: "{{ __openvpn_service_prefix }}@{{ openvpn_client_name }}"
|
||||
state: "{{ openvpn_service_state }}"
|
||||
enabled: yes
|
||||
become: True
|
||||
|
2
vars/redhat-7.yml
Normal file
2
vars/redhat-7.yml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
__openvpn_service_prefix: openvpn
|
2
vars/redhat-8.yml
Normal file
2
vars/redhat-8.yml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
__openvpn_service_prefix: openvpn-client
|
Loading…
Reference in New Issue
Block a user