LoginSignup
13
13

More than 5 years have passed since last update.

ansibleでphp composerをインストール

Last updated at Posted at 2017-01-28
php-composer.yml
  - name: check composer
    stat: path=/usr/local/bin/composer
    register: composer_bin
    tags: composer

  - block:
    - name: download composer
      get_url:
        url: https://getcomposer.org/installer
        dest: /tmp/installer

    - name: install composer
      shell: cat /tmp/installer | php -- --install-dir=/usr/local/bin

    - name: rename composer.phar to composer
      shell: mv /usr/local/bin/composer.phar /usr/local/bin/composer

    - name: make composer executable
      file:
        path: /usr/local/bin/composer
        mode: a+x
        state: file

    when: not composer_bin.stat.exists
    tags: composer
13
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
13