changing permissions for deb_packages tasks

This commit is contained in:
gezimbll
2023-08-09 10:46:06 -04:00
committed by Dan Christian Bogos
parent eaa0d808af
commit 5670a0b399

View File

@@ -199,13 +199,11 @@
- hosts: pkg
vars:
ansible_python_interpreter: auto # to disable deprication warning related to the use of python2
remote_user: '{{ user }}'
tasks:
- name: Add user to www-data group
become: yes
user:
name: "{{ remote_user }}"
name: "{{ user }}"
groups: www-data
append: yes
@@ -223,22 +221,16 @@
group: www-data
- name: Remove symlink from current deb package
become: yes
become_user: www-data
file:
path: /var/packages/deb/{{ cgrates_distribution }}/cgrates_current_amd64.deb
state: absent
when : cgrates_distribution == "nightly" or hostvars['apt']['gitTagVar'].stdout_lines|length > 0
- name: Move the new package to /var/packages/deb
become: yes
become_user: www-data
shell: "mv /tmp/{{ item}} /var/packages/deb/{{ cgrates_distribution }}/"
with_items: "{{ hostvars['apt']['debFileName']['stdout_lines'] }}"
- name: Create the new symlink cgrates_current_amd64.deb
become: yes
become_user: www-data
file:
src: /var/packages/deb/{{ cgrates_distribution }}/{{ item }}
dest: /var/packages/deb/{{ cgrates_distribution }}/cgrates_current_amd64.deb