Skip to content

Instantly share code, notes, and snippets.

View tuxis-ie's full-sized avatar

Tuxis B.V. tuxis-ie

View GitHub Profile
@tuxis-ie
tuxis-ie / gist:2bc33b4149a8d9be236b3eb431321dc7
Created September 26, 2016 08:58
Ansible realpath not working?
On the machine:
root@proxmox01:/# ls -al /root/.ssh/authorized_keys
lrwxrwxrwx 1 root root 29 Sep 26 10:40 /root/.ssh/authorized_keys -> /etc/pve/priv/authorized_keys
In the playbook:
- debug: msg={{ '/root/.ssh/authorized_keys' | realpath }}
Output:
TASK [customers : debug] *******************************************************
$result = $client->search_prefix(array(
'auth' => $auth,
'query' =>
array(
'operator' => 'and',
'val1' => array(
'operator' => 'equals',
'val1' => 'type',
'val2' => 'assignment'),
'val2' => array(
- name: Configure cdn.tuxis.net
hosts: cdn.tuxis.net
vars:
- nullmailer_needauth: yes
roles:
- tuxis_meta
- name: Configure cdn.tuxis.net
hosts: cdn.tuxis.net
vars:
- nullmailer_needauth: yes
roles:
- tuxis_meta
$result = $client->search_prefix(array(
'auth' => $auth,
'query_string' =>
array( "operator" => "equals",
"val1" => "customer_id",
"val2" => $adminuser['customer_id'])
));
Uncaught exception 'XML_RPC2_FaultException' with message '<type 'exceptions.TypeError'>:argument of type 'NoneType' is not iterable' in /usr/share/php/XML/RPC2/Exception.php
$net = Net_IPv4::parseAddress($addr['prefix']);
$addresses = 2**(32-$net->bitmask);
$start = ip2long($net->network);
for ($i = 1; $i <= $addresses; $i++) {
print long2ip($start+$i);
print "\n";
}
diff --git a/includes/dbFacile.mysqli.php b/includes/dbFacile.mysqli.php
index 2408ca9..1cc3492 100644
--- a/includes/dbFacile.mysqli.php
+++ b/includes/dbFacile.mysqli.php
@@ -65,7 +65,7 @@ function dbQuery($sql, $parameters=array()) {
* */
-function dbInsert($data, $table) {
+function dbInsert($data, $table, $replace = false) {
#!/usr/bin/perl -w
use constant {
TIMEZONE => 'Europe/Amsterdam'
};
use strict;
use PVE::API2Client;
use PVE::AccessControl;
use PVE::INotify;
- name: Copy cronscripts
copy: src={{ item }} dest=/etc/ mode=0750 owner=root group=root
with_first_found:
- files:
- "{{inventory_hostname}}/etc/cronscripts/"
paths:
- /etc/ansible/files
skip: true