diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2bf2984cf147efb2aaf395292b9b3aa51f1cce02..134a1273b01e8e13bbe71733ff823be5b0b89594 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
 
 ## [Unreleased]
 
+### Fixed
+
+* Can not update project variable defined for many environments. (#5)
+
 ## 0.1.0 - 2022-01-25
 
 ### Added
diff --git a/tasks/configure.yml b/tasks/configure.yml
index 56c52fd3b049e4433d65e5564ce27e6fd2f11475..4c2ae5a3afda0839930daf91c29349b247454e92 100644
--- a/tasks/configure.yml
+++ b/tasks/configure.yml
@@ -49,7 +49,7 @@
 
     - name: "edit project variables"
       ansible.builtin.uri:
-        url: "{{ _gitlab_ci_project_variables_api_url }}/{{ _gitlab_ci_existing_project_variable.key }}"
+        url: "{{ _gitlab_ci_project_variables_api_url }}/{{ _gitlab_ci_existing_project_variable.key }}?filter[environment_scope]={{ _loop_gitlab_project_variable.environment_scope }}"
         method: "PUT"
         headers:
           PRIVATE-TOKEN: "{{ gitlab_ci_token }}"