From c6ce91bc95ffc856fb1ebd8f0317c4efc1bee9a1 Mon Sep 17 00:00:00 2001 From: Igor Mukhin Date: Thu, 7 May 2015 01:26:44 +0300 Subject: [PATCH 1/3] Added fake composer_github_oauth to tests/playbook.yml for issue #19 reproduction --- tests/playbook.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/playbook.yml b/tests/playbook.yml index ec8c897..f861ee1 100644 --- a/tests/playbook.yml +++ b/tests/playbook.yml @@ -2,6 +2,8 @@ - hosts: all sudo: true + vars: + composer_github_oauth: f03401aae1e276abb073f987c08a32410f462e73 roles: - { role: common, tags: apt } - { role: ../../ansible-role-composer, tags: composer } From 52cd567b4f09122553b4b949543bf914e14f2825 Mon Sep 17 00:00:00 2001 From: Igor Mukhin Date: Thu, 7 May 2015 01:35:09 +0300 Subject: [PATCH 2/3] Fix issue 19 - create composer home path without any conditions --- tasks/configure.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tasks/configure.yml b/tasks/configure.yml index 738dc4e..f1aac5a 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -1,8 +1,7 @@ --- - name: Create composer home path - file: path={{ composer_home_path }} state=directory owner={{ composer_home_owner }} group={{ composer_home_group }} - when: composer_home_path is defined + file: path={{ composer_home_path|default('~/.composer') }} state=directory owner={{ composer_home_owner }} group={{ composer_home_group }} - name: Configure composer home path copy: dest=/etc/profile.d/composer-home.sh mode=0755 From 80b94b52ff194505766c7cf51dea6b799a5d51f3 Mon Sep 17 00:00:00 2001 From: Igor Mukhin Date: Thu, 7 May 2015 01:36:18 +0300 Subject: [PATCH 3/3] Use 'composer_home_path' during auth.json generation --- tasks/oauth.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/oauth.yml b/tasks/oauth.yml index 850e5b1..84d4567 100644 --- a/tasks/oauth.yml +++ b/tasks/oauth.yml @@ -3,5 +3,5 @@ - name: Configure github oauth token template: src: ".composer/auth.json.j2" - dest: "~/.composer/auth.json" + dest: "{{ composer_home_path|default('~/.composer') }}/auth.json" when: composer_github_oauth != false