diff --git a/tasks/horizon_post_install.yml b/tasks/horizon_post_install.yml index 53dfc79b..5507ea40 100644 --- a/tasks/horizon_post_install.yml +++ b/tasks/horizon_post_install.yml @@ -90,6 +90,8 @@ - name: Compile messages for translation command: "{{ horizon_bin }}/horizon-manage.py compilemessages" + become: yes + become_user: "{{ horizon_system_user_name }}" args: chdir: "{{ horizon_lib_dir }}/{{ item }}" changed_when: false diff --git a/tasks/main.yml b/tasks/main.yml index 640d075a..5d577649 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -72,6 +72,8 @@ - name: Ensure messages are compiled for translation async_status: jid: "{{ item.ansible_job_id }}" + become: yes + become_user: "{{ horizon_system_user_name }}" register: async_compile_messages_check until: async_compile_messages_check.finished retries: 300