mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
ansible: add TP directory permissions setup
This commit is contained in:
committed by
Dan Christian Bogos
parent
0e06476d74
commit
cd0c7245f7
@@ -12,6 +12,9 @@ vault_github_repo_name=your_private_config_repo_name
|
||||
# Configuration source path in repository
|
||||
vault_cgrates_config_source_path=node_test/etc/cgrates
|
||||
|
||||
# TP directory path where CGRates creates lock files when loading TP data (optional)
|
||||
vault_cgrates_tp_path=node_test/tp
|
||||
|
||||
# SSH key configuration (optional)
|
||||
# github_ssh_use_deploy_keys=false
|
||||
# github_ssh_deploy_key_read_only=false
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
github_ssh_token: "{{ vault_github_token }}"
|
||||
github_ssh_repo_owner: "{{ vault_github_repo_owner }}"
|
||||
github_ssh_repo_name: "{{ vault_github_repo_name }}"
|
||||
when:
|
||||
when:
|
||||
- vault_github_token is defined
|
||||
- vault_github_repo_owner is defined
|
||||
- vault_github_repo_name is defined
|
||||
@@ -84,6 +84,22 @@
|
||||
msg: "Source path '{{ cgrates_config_source_path }}' not found in repository, skipping configuration"
|
||||
when: not config_source_stat.stat.exists
|
||||
|
||||
- name: Setup TP directory permissions needed for cgrates to create lock files when loading TP data
|
||||
block:
|
||||
- name: Add cgrates user to ansible user's group for shared access
|
||||
ansible.builtin.user:
|
||||
name: cgrates
|
||||
groups: "{{ ansible_user }}"
|
||||
append: true
|
||||
|
||||
- name: Set group write permission on TP directory for cgrates lock file creation
|
||||
ansible.builtin.file:
|
||||
path: "{{ cgrates_repo_dir }}/{{ vault_cgrates_tp_path }}"
|
||||
mode: '0775'
|
||||
when:
|
||||
- config_source_stat.stat.exists
|
||||
- vault_cgrates_tp_path is defined
|
||||
|
||||
handlers:
|
||||
- name: restart cgrates
|
||||
ansible.builtin.systemd:
|
||||
|
||||
Reference in New Issue
Block a user