Skip to content
Snippets Groups Projects
Commit 96436273 authored by jurgenhaas's avatar jurgenhaas
Browse files

Add Ansible support for localhost

parent 470d07b4
No related branches found
No related tags found
No related merge requests found
Pipeline #473616 passed
#!/bin/bash
/usr/local/bin/docker-ansible a "$@"
#!/bin/bash
/usr/local/bin/docker-ansible apb "$@"
#!/bin/bash
/usr/local/bin/docker-ansible ascr "$@"
#!/bin/bash
SCRIPT=$1
shift
docker run \
$(php /usr/local/bin/volume.php --all) \
registry.lakedrops.com/ansible-inventories/localhost \
/usr/local/bin/$SCRIPT "$@" --limit=localhost
......@@ -33,4 +33,18 @@ function getDockerMountSource($args) {
return $currentDir . $suffix . ':' . $destDir . $suffix;
}
print(getDockerMountSource($argv));
function getAllDockerMountSources() {
$volumes = [];
$container = readContainerConfig();
foreach ($container['Mounts'] as $mount) {
$volumes[] = '-v ' . $mount['Source'] . ':' . $mount['Destination'];
}
return implode(' ', $volumes);
}
if ($argc === 1 || $argv[1] !== '--all') {
print(getDockerMountSource($argv));
}
else {
print(getAllDockerMountSources());
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment