Refactor ansible-apply.yaml and inventory/hosts, add playbook_m3uproxy.yml
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
---
|
||||
- name: M3Uproxy Playbook (K8s)
|
||||
hosts: m3uproxy
|
||||
gather_facts: true
|
||||
|
||||
# Specific tasks for this playbook
|
||||
tasks:
|
||||
- name: Set required facts
|
||||
ansible.builtin.set_fact:
|
||||
m3uproxy_home: "/var/lib/m3uproxy"
|
||||
m3uproxy_user_id: 1000
|
||||
m3uproxy_group_id: 1000
|
||||
tags: always
|
||||
|
||||
- name: Create required m3uproxy data folder
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
state: directory
|
||||
path: "{{ item }}"
|
||||
mode: "0750"
|
||||
owner: "{{ m3uproxy_user_id }}"
|
||||
group: "{{ m3uproxy_group_id }}"
|
||||
with_items:
|
||||
- "{{ m3uproxy_home }}"
|
||||
- "{{ m3uproxy_home }}/cache"
|
||||
- "{{ m3uproxy_home }}/squid"
|
||||
- "{{ m3uproxy_home }}/geoip"
|
||||
tags:
|
||||
- tasks
|
||||
- tasks::folders
|
||||
Reference in New Issue
Block a user