diff --git a/.travis.yml b/.travis.yml index 6c8ebdb70f87490f382e8e14859da969f20be6cd..47d26ae27b8f8d3e85f72527bde5b556ecbf3d5c 100755 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,5 @@ +--- + language: python python: diff --git a/defaults/main.yml b/defaults/main.yml index ec521c1a8b6df5e1e47399c413d340e972d7aed8..d52bffcaf03568cc0fec2b0835bbc64d9bba7bf2 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,3 +1,5 @@ +--- + composer_path: /usr/local/bin/composer composer_update: true composer_update_day: 20 diff --git a/meta/main.yml b/meta/main.yml index 231b811531ebce8d5d331aae87664060cf93f6ab..fdbcf379a8d766e7742692920079eb4c872d7e5e 100755 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,3 +1,5 @@ +--- + galaxy_info: author: kosssi description: Install and Update Composer PHP Dependency Manager diff --git a/tasks/install.yml b/tasks/install.yml index 3a1de8a1bd8d67b0f5c768f9532d0bcfb982dadd..5a32c4b36232203c63c63b39d1ad3654533ab83e 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -1,3 +1,5 @@ +--- + - name: Download and install Composer into the current directory. shell: php -r "readfile('https://getcomposer.org/installer');" | php diff --git a/tasks/main.yml b/tasks/main.yml index 5536a42118ab84eef60b492f6d680f815f4da060..00bc406145fb7dccdb6bc501912fee5b92b24281 100755 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,3 +1,5 @@ +--- + - include: install.yml - include: test.yml - include: update.yml diff --git a/tasks/test.yml b/tasks/test.yml index 832853c71b91ae731b3d80114eea171a14e48099..f29bfa9b5d2554a6219127797bbbc776b117105f 100644 --- a/tasks/test.yml +++ b/tasks/test.yml @@ -1,3 +1,5 @@ +--- + - name: Get stat of composer file stat: path="{{ composer_path }}" diff --git a/tasks/update.yml b/tasks/update.yml index c88f562244abb80fa6a66834276a99bb899d694a..c553dc6b038992a7036502b35bf9961e991cdaa4 100644 --- a/tasks/update.yml +++ b/tasks/update.yml @@ -1,3 +1,5 @@ +--- + - name: Get date for composer update shell: date --date="{{ composer_update_day }} days ago" +"%s" diff --git a/tests/playbook.yml b/tests/playbook.yml index 2ec89ee17bcadf8de60e02a88b50caaa5bed753a..ec8c8977d3e947b43cc245d261213432ab962269 100644 --- a/tests/playbook.yml +++ b/tests/playbook.yml @@ -1,5 +1,7 @@ +--- + - hosts: all sudo: true roles: - - { role: common, tags: apt } + - { role: common, tags: apt } - { role: ../../ansible-role-composer, tags: composer } diff --git a/tests/roles/common/tasks/main.yml b/tests/roles/common/tasks/main.yml index e652ef5437199310f486e9941acdd3c5b9dd6d52..9b011f26169039aa7826fe95345b2df4785f60b2 100644 --- a/tests/roles/common/tasks/main.yml +++ b/tests/roles/common/tasks/main.yml @@ -1,3 +1,5 @@ +--- + - name: Update Apt cache apt: update_cache=yes