kinazen/ansible-php

Ansible wrapper for PHP

v0.1.3 2019-01-01 06:53 UTC

README

Build Status Coverage Status Latest Stable Version Total Downloads License composer.lock Scrutinizer Code Quality Code Intelligence Status

Ansible wrapper for PHP

Required

  • PHP 7.1 or greater
  • Ansible installed

Attention

If you install Ansible using pip and not globally, please, set the location for the Ansible binary using the setAnsibleBin() method

Installation

Using Composer

curl -s http://getcomposer.org/installer | php
php composer.phar require kinazen/ansible-php

Existing projects

composer require kinazen/ansible-php

How to use

<?php

require_once 'vendor/autoload.php';

// the static make() method is simply creating a new instance
// you can switch to new \Kinazen\AnsiblePhp\Ansible() if you want
$ansible = \Kinazen\AnsiblePhp\Ansible::make();

// the only required parameter is setting the playbook that will be run
$ansible->setPlaybook('/dir/where/my-playbook-exists.yml');

// run the playbook
$ansible->run();

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Make your changes
  4. Run the tests, adding new ones for your own code if necessary (vendor/bin/phpunit)
  5. Commit your changes (git commit -am 'Added some feature')
  6. Push to the branch (git push origin my-new-feature)
  7. Create new Pull Request

This contributing recipe was copied from Vance Lucas (@vlucas) DotEnv project

License

This library is open-sourced software licensed under the MIT license.