library ansible-php
使用PHP 执行ansible shell命令的小工具
chenjiesuper/ansible-php
使用PHP 执行ansible shell命令的小工具
- Sunday, January 15, 2017
- by chenjie
- Repository
- 1 Watchers
- 1 Stars
- 12 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 6 Versions
- 9 % Grown
描述
使用PHP 执行ansible shell命令的小工具, (*1)
安装前
请确保已经安装ansible并配置了相关的中心机和客户机的ssh_auth,ssh_config(在中心机配置客户机的别名或机器组)
并将中心机PHP配置文件php.ini中disable_functions中值删除后重启PHP-FPM, (*2)
安装
composer require chenjiesuper/ansible-php
使用说明
include __DIR__ . '/vendor/autoload.php';
use Jay\Ansible\Command;
$name = 'dev'; //中心机配置的客户机别名或机器组名
$binPath = '/usr/bin/ansible'; //中心机ansible 命令绝对路径
$test = new Command($name);
//$test = new Command($name, $binPath); //$binPaht 默认值/usr/bin/ansible,可不传
$ls = $test->run('ls'); //执行具体shell命令
var_dump($ls);
dev-master
9999999-dev
使用PHP 执行ansible shell命令的小工具
Sources
Download
Apache-2.0
The Requires
by
chenjie
v0.5
0.5.0.0
使用PHP 执行ansible shell命令的小工具
Sources
Download
Apache-2.0
The Requires
by
chenjie
v0.4
0.4.0.0
使用PHP 执行ansible shell命令的小工具
Sources
Download
Apache-2.0
The Requires
by
chenjie
v0.3
0.3.0.0
ansible,php
Sources
Download
Apache-2.0
The Requires
by
chenjie
v0.2
0.2.0.0
ansible,php
Sources
Download
Apache-2.0
The Requires
by
chenjie
v0.1
0.1.0.0
ansible,php
Sources
Download
Apache-2.0
The Requires
by
chenjie