/ansible-role-php-composer

Ansible role to install PHP & Composer

MIT LicenseMIT

Ansible Role for PHP & Composer

License: MIT

This repo contains a Linux-distro agnostic Ansible role that installs PHP + Composer + Composer global packages.

Requirements

  • No additional requirements.

Notes

  • ⚠️ There is no way to install certain PHP version using this role. PHP version depends on your Linux distribution. It's the main idea behind the role: rely only on linux distro repositories.

  • ⚠️ The role does not change your profile files (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc). Make sure you have added the following to the profile file:

    export PATH="$PATH:$HOME/.composer/vendor/bin"

Example Ansible Playbook

- hosts: 127.0.0.1
  roles:
    - role: ansible-role-php-composer
      vars:
        php_extra_packages:
          - php-mysql
        php_composer_home_dir: '{{ ansible_env.HOME }}/.composer'
        php_composer_install_dir: '/usr/local/bin'
        php_composer_global_packages:
          - squizlabs/php_codesniffer
          - drupal/coder

Author

👤 Alexander Danilenko

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2022 Alexander Danilenko.
This project is MIT licensed.


This README was generated with ❤️ by readme-md-generator