From 3eaa59684cd906af379a90c2e14094b9b85ecbf1 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Wed, 20 Sep 2017 16:11:12 +0200 Subject: Added ipam.adyxax.org policies --- services/applications/ipam.cf | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 services/applications/ipam.cf (limited to 'services/applications/ipam.cf') diff --git a/services/applications/ipam.cf b/services/applications/ipam.cf new file mode 100644 index 0000000..067cb29 --- /dev/null +++ b/services/applications/ipam.cf @@ -0,0 +1,41 @@ +bundle agent ipam +{ + vars: + ipam:: + "config[host]" string => "mysql01"; + "config[user]" string => "phpipam"; + "config[pass]" string => "Hee0Hai8lie2gaaBia8xaisieSiengie"; + "config[name]" string => "phpipam"; + "config[port]" string => "3306"; + "index" slist => getindices("ipam.config"); + "packages" slist => { + "pear", + "php56-filter", + "php56-gettext", + "php56-gd", + "php56-gmp", + "php56-json", + "php56-mbstring", + "php56-openssl", + "php56-pdo_mysql", + "php56-session", + "php56-simplexml", + "php56-sockets", + }; + methods: + ipam:: + "ipam" usebundle => install_package("$(this.bundle)", "$(ipam.packages)"); + "ipam" usebundle => fcgiwrap("nobody", "www", "770"); + "ipam" usebundle => php56(); + "ipam" usebundle => nginx("$(sys.inputdir)/templates/nginx/ipam_nginx.conf", "nginx.conf"); + files: + ipam:: + "/var/www/phpipam/config.php" + create => "true", + perms => system_owned("444"), + edit_line => regex_replace("\$db\['$(index)'\]\s+=\s+\"(?!$(config[$(index)]))[^\"]+\";", "$db['$(index)'] = \"$(config[$(index)])\";"), + classes => if_repaired("ipam_ipam_config_php_repaired"); + reports: + any:: + "$(this.bundle): /var/www/phpipam/config.php repaired" ifvarclass => "ipam_ipam_config_php_repaired"; +} -- cgit v1.2.3