Skip to content

Commit

Permalink
Fix disable reverse sync on mgmt command (#1977)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealHaoLiu authored Oct 18, 2024
1 parent 3822e32 commit 79ab6f0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions roles/installer/tasks/initialize_django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@
namespace: "{{ ansible_operator_meta.namespace }}"
pod: "{{ awx_web_pod_name }}"
container: "{{ ansible_operator_meta.name }}-web"
command: awx-manage createsuperuser --username={{ admin_user | quote }} --email={{ admin_email | quote }} --noinput
command: bash -c "ANSIBLE_REVERSE_RESOURCE_SYNC=false awx-manage createsuperuser --username={{ admin_user | quote }} --email={{ admin_email | quote }} --noinput"
register: result
changed_when: "'That username is already taken' not in result.stderr"
failed_when: "'That username is already taken' not in result.stderr and 'Superuser created successfully' not in result.stdout"
no_log: "{{ no_log }}"
environment:
ANSIBLE_REVERSE_RESOURCE_SYNC: "false"
when: users_result.return_code > 0

- name: Update Django super user password
Expand Down Expand Up @@ -116,9 +114,7 @@
pod: "{{ awx_web_pod_name }}"
container: "{{ ansible_operator_meta.name }}-web"
command: >-
bash -c "awx-manage create_preload_data"
bash -c "ANSIBLE_REVERSE_RESOURCE_SYNC=false awx-manage create_preload_data"
register: cdo
changed_when: "'added' in cdo.stdout"
environment:
ANSIBLE_REVERSE_RESOURCE_SYNC: "false"
when: create_preload_data | bool

0 comments on commit 79ab6f0

Please sign in to comment.