diff --git a/tasks/auth_json.yml b/tasks/auth_json.yml index a78bf29c813c583ec5d245c59a12511a6cb8011d..196ef2ac74eafc71b0e7c30a18096f223a6d6ff0 100644 --- a/tasks/auth_json.yml +++ b/tasks/auth_json.yml @@ -2,8 +2,8 @@ - name: "Ensure Composer Home for root" file: - path='/root/.composer' - state='directory' + path: '/root/.composer' + state: 'directory' - name: "Configure github oauth token" template: diff --git a/tasks/configure.yml b/tasks/configure.yml index 7fc762ddbb93a645a9eef994c12d8ff83f05d524..7c6bd8fcfadf42915a7e13bd8eab2765af134ecf 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -1,18 +1,26 @@ --- -- name: Create composer home path - file: path={{ composer_home_path }} state=directory owner={{ composer_home_owner }} group={{ composer_home_group }} +- name: "Create composer home path" + file: + path: '{{ composer_home_path }}' + state: 'directory' + owner: '{{ composer_home_owner }}' + group: '{{ composer_home_group }}' -- name: Configure composer home path - copy: dest=/etc/profile.d/composer-home.sh mode='755' - content="export COMPOSER_HOME={{ composer_home_path}}\n" +- name: "Configure composer home path" + copy: + dest: '/etc/profile.d/composer-home.sh' + mode: '755' + content: "export COMPOSER_HOME={{ composer_home_path}}\n" when: composer_home_path is defined -- name: Configure composer path environment - copy: dest=/etc/profile.d/composer-path.sh mode='755' - content="export PATH=${PATH}:{{ composer_home_path }}/vendor/bin\n" +- name: "Configure composer path environment" + copy: + dest: '/etc/profile.d/composer-path.sh' + mode: '755' + content: "export PATH=${PATH}:{{ composer_home_path }}/vendor/bin\n" -- name: Global require packages +- name: "Global require packages" shell: COMPOSER_HOME={{ composer_home_path }} composer global require {{ item.key }}:{{ item.value }} --no-progress creates={{ composer_home_path }}/vendor/{{ item.key }} @@ -20,6 +28,6 @@ when: composer_global_packages|combine(composer_global_packages_base)|length > 0 tags: 'update' -- name: Disable XDebug for CLI +- name: "Disable XDebug for CLI" command: '{{ (php_version|default("5.5") == "7") | ternary("phpdismod", "php5dismod") }} -s cli xdebug' tags: 'update' diff --git a/tasks/install.yml b/tasks/install.yml index 8e820486e972a72d092d372c980a835d2ec50c76..70950c5413ed320d8852df79d3ec8616f6ad72c2 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -1,7 +1,8 @@ --- -- name: Download and install Composer into the target directory. +- name: "Download and install Composer into the target directory." get_url: - url=https://getcomposer.org/composer.phar - dest={{ composer_path }} - mode='755' + url: 'https://getcomposer.org/composer.phar' + timeout: '{{ composer_get_timeout|default(omit) }}' + dest: '{{ composer_path }}' + mode: '755' diff --git a/tasks/test.yml b/tasks/test.yml index f29bfa9b5d2554a6219127797bbbc776b117105f..6855003242f2d4d09663a3fef5fcbe45c22be8c9 100644 --- a/tasks/test.yml +++ b/tasks/test.yml @@ -1,11 +1,11 @@ --- -- name: Get stat of composer file +- name: "Get stat of composer file" stat: - path="{{ composer_path }}" + path: "{{ composer_path }}" register: composer_stat -- name: Test if composer file exist +- name: "Test if composer file exist" fail: - msg="{{ composer_path }} isn't exist" + msg: "{{ composer_path }} doesn't exist" when: composer_stat.stat.exists == false diff --git a/tasks/update.yml b/tasks/update.yml index 39febd29d88146de39c43b0a1db32d0e449be202..640df0246c964761825a99e27f1fc306b88ed56d 100644 --- a/tasks/update.yml +++ b/tasks/update.yml @@ -1,16 +1,18 @@ --- -- name: Get date for composer update - shell: - date --date='{{ composer_update_day }} days ago' +'%s' +- name: "Get date for composer update" + shell: "date --date='{{ composer_update_day }} days ago' +'%s'" register: composer_date changed_when: False -- name: Update composer if necessary - shell: - "{{ composer_path }} selfupdate" +- name: "Update composer if necessary" + shell: "{{ composer_path }} selfupdate" when: composer_date.stdout|int > composer_stat.stat.mtime|int -- name: Update Composer Packages +- name: "Update Composer Packages" shell: COMPOSER_HOME={{ composer_home_path }} composer global update + + +composer config --global repo.packagist composer https://packagist.org +composer global update --verbose -vvv --profile