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 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 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 }