manala.composer

#######################################################################################################

:exclamation: DEPRECATION :exclamation:

This repository and the associated role are no longer maintained. Please use the Manala Ansible Collection instead.

You can find more information about its usage in the collection repository.

#######################################################################################################

Ansible Role: Composer Build Status

:exclamation: Please report issues and submit Pull Requests in the main Ansible Role repository :exclamation:

This role helps set up Composer.

It's part of the Manala Ansible stack but can also be used separately.

Requirements

None.

Dependencies

This role requires php-cli version 5.3.2 or higher. You can use the manala.php role for this.

Installation

For Ansible 2+

Using the Ansible Galaxy command line:

ansible-galaxy install manala.composer

Using an Ansible Galaxy requirements file:

- src: manala.composer

Role Handlers

None.

Role Variables

Definitions

Name Default Type Description
manala_composer_version ~ String Version to install, defaults to latest
manala_composer_install_packages ~ Array Packages to install as dependencies
manala_composer_install_packages_default ['openssl', 'ca-certificates'] Array Default packages to install
manala_composer_bin '/usr/local/bin/composer' String Path to the Composer binary
manala_composer_users_auth_template ~ String Path to user auth template
manala_composer_users_auth [] Array User authentication configuration
manala_composer {} Dict Used for custom flags

Configuration Example

Versions

By default, this role installs the latest stable version of Composer. If you need a specific version, set manala_composer_version to your desired version (e.g., 1.10.16). To get the latest version of a specific major version (channel), set manala_composer_version to that channel (e.g., 1 or 2).

If you choose a specific channel and want to update to the latest version of that channel:

  • Set manala_composer_version to that channel (e.g., 1 or 2).
  • Set manala_composer.update=true.

Configuring Composer with a GitHub Token

manala_composer_users_auth:
  - user: foo
    config:
      github-oauth:
        github.com: 9927d2878ffa105fc5236c762f2fd7zfd28b841d
      http-basic:
        repo.example1.org:
          username: my-username1
          password: my-secret-password1
  - user: bar
    # Use raw content
    config: |
      {
          "github-oauth": {
              "github.com": "9927d2878ffa105fc5236c762f2fd7zfd28b841d"
          },
          "http-basic": {
              "repo.example1.org": {
                  "username": "my-username1",
                  "password": "my-secret-password1"
              }
          }
      } 
  - user: baz
    config:
      # Use deprecated dict's array syntax
      - github-oauth:
        - github.com: 9927d2878ffa105fc5236c762f2fd7zfd28b841d
      - http-basic:
        - repo.example1.org:
          - username: my-username1
          - password: my-secret-password1

Example Playbook

- hosts: servers
  roles:
    - role: manala.composer

License

MIT

Author Information

Manala (http://www.manala.io/)

Informazioni sul progetto

Handle composer

Installa
ansible-galaxy install manala.composer
Licenza
Unknown
Download
8.3k
Proprietario
Manala is an open source project supported by the french web agency ELAO providing advanced ansible roles for website's infrastructures and far more.