Composer Issue with HTTP auth

Also hit this a few days ago, we did a quick solve by changing roles/wordpress-install/tasks/main.yml:

 - include_tasks: tasks/composer-authentications.yml
   vars:
-    site: "{{ item.key }}"
-    working_dir: "{{ www_root }}/{{ item.key }}/{{ item.value.current_path | default('current') }}/"
+    site: "{{ site.key }}"
+    working_dir: "{{ www_root }}/{{ site.key }}/{{ site.value.current_path | default('current') }}/"
   no_log: true
   loop: "{{ wordpress_sites | dict2items }}"
   loop_control:
-    label: "{{ item.key }}"
+    loop_var: site # Edit: We need a loop var other than the default 'item'.
+    label: "{{ site.key }}"

I meant to stick a PR up with the suggestion but time ran away from me. Would be happy to if this helps

3 Likes