diff options
Diffstat (limited to 'doc/forum')
22 files changed, 323 insertions, 0 deletions
diff --git a/doc/forum/Apache.siteEnabled_doesn_not_update_the_apache_config_file.mdwn b/doc/forum/Apache.siteEnabled_doesn_not_update_the_apache_config_file.mdwn new file mode 100644 index 00000000..b678d8d0 --- /dev/null +++ b/doc/forum/Apache.siteEnabled_doesn_not_update_the_apache_config_file.mdwn @@ -0,0 +1,34 @@ +Hello, + +Still working on the reprepro property :) + +Here A property that I am using to publish a repository via apache (this is a prototype) + + website :: String -> Property + website hn = toProp $ Apache.siteEnabled hn apachecfg + where + apachecfg = [ "<VirtualHost *>" + , "DocumentRoot " ++ basePath + , "<Directory " ++ basePath ++ ">" + , " Options Indexes FollowSymLinks Multiviews" + , " Order allow,deny" + , Apache.allowAll + , "</Directory>" + ] ++ concatMap deny ["db", "conf", "incoming"] + ++ ["</VirtualHost>"] + + deny dir = [ "<Directory \"" ++ basePath ++ "apt/*/" ++ dir ++ "\">" + , " Order deny,allow" + , " Deny from all" + , "</Directory>" + ] + +during my test I am runing the config.hs with +runhaskell config.hs (it work the first time, the apache config files are ok) + +but when I do a modification on the apachecfg and rerun the runhaskell, +the config files are not updated. I need to remove them to have an updated version. + +cheers + +Fred diff --git a/doc/forum/Apache.siteEnabled_doesn_not_update_the_apache_config_file/comment_1_932ba6f4e444c99d8d561149d17c8fe7._comment b/doc/forum/Apache.siteEnabled_doesn_not_update_the_apache_config_file/comment_1_932ba6f4e444c99d8d561149d17c8fe7._comment new file mode 100644 index 00000000..0101ccb2 --- /dev/null +++ b/doc/forum/Apache.siteEnabled_doesn_not_update_the_apache_config_file/comment_1_932ba6f4e444c99d8d561149d17c8fe7._comment @@ -0,0 +1,30 @@ +[[!comment format=mdwn + username="picca" + subject="first run" + date="2014-12-08T09:31:46Z" + content=""" +root@mordor:~/propellor/src# PROPELLOR_DEBUG=1 runhaskell config.hs +[2014-12-08 10:27:10 CET] read: hostname [\"-f\"] +[2014-12-08 10:27:10 CET] command line: Run \"mordor\" +[2014-12-08 10:27:10 CET] read: git [\"remote\"] +[2014-12-08 10:27:10 CET] read: git [\"symbolic-ref\",\"--short\",\"HEAD\"] +[2014-12-08 10:27:10 CET] call: git [\"fetch\"] +Pull from central git repository ... done +[2014-12-08 10:27:12 CET] read: git [\"show-ref\",\"--hash\",\"master\"] +[2014-12-08 10:27:12 CET] read: git [\"show-ref\",\"--hash\",\"master\"] +mordor has Operating System (Debian Unstable) \"i386\" ... ok +[2014-12-08 10:27:12 CET] read: apt-cache [\"policy\",\"etckeeper\"] +mordor apt installed etckeeper ... ok +[2014-12-08 10:27:13 CET] read: apt-cache [\"policy\",\"ssh\"] +mordor apt installed ssh ... ok +[2014-12-08 10:27:13 CET] read: passwd [\"-S\",\"root\"] +mordor root has password ... ok +[2014-12-08 10:27:13 CET] call: a2query [\"-q\",\"-s\",\"reprepro\"] +[2014-12-08 10:27:14 CET] read: apt-cache [\"policy\",\"apache2\"] +[2014-12-08 10:27:14 CET] call: a2ensite [\"--quiet\",\"reprepro\"] +Enabling site reprepro. +[2014-12-08 10:27:15 CET] call: sh [\"-c\",\"set -e ; service 'apache2' reload >/dev/null 2>&1 || true\"] +mordor create reprepro ... done +mordor overall ... done + +"""]] diff --git a/doc/forum/Apache.siteEnabled_doesn_not_update_the_apache_config_file/comment_2_5323336b92d9aef5a9021b924029f3af._comment b/doc/forum/Apache.siteEnabled_doesn_not_update_the_apache_config_file/comment_2_5323336b92d9aef5a9021b924029f3af._comment new file mode 100644 index 00000000..85a57383 --- /dev/null +++ b/doc/forum/Apache.siteEnabled_doesn_not_update_the_apache_config_file/comment_2_5323336b92d9aef5a9021b924029f3af._comment @@ -0,0 +1,38 @@ +[[!comment format=mdwn + username="picca" + subject="second run with content modified" + date="2014-12-08T09:37:43Z" + content=""" +Second run after adding a space here + + - , \" Options Indexes FollowSymLinks Multiviews\" + + , \" Options Indexes FollowSymLinks Multiviews\" + + + root@mordor:~/propellor/src# PROPELLOR_DEBUG=1 runhaskell config.hs + [2014-12-08 10:34:19 CET] read: hostname [\"-f\"] + [2014-12-08 10:34:19 CET] command line: Run \"mordor\" + [2014-12-08 10:34:19 CET] read: git [\"remote\"] + [2014-12-08 10:34:19 CET] read: git [\"symbolic-ref\",\"--short\",\"HEAD\"] + [2014-12-08 10:34:19 CET] call: git [\"fetch\"] + remote: Counting objects: 32, done. + remote: Compressing objects: 100% (6/6), done. + remote: Total 6 (delta 3), reused 0 (delta 0) + Dépaquetage des objets: 100% (6/6), fait. + Depuis git://git.kitenet.net/propellor + c5a8cae..9ac0dfb master -> origin/master + Pull from central git repository ... done + [2014-12-08 10:34:20 CET] read: git [\"show-ref\",\"--hash\",\"master\"] + [2014-12-08 10:34:20 CET] read: git [\"show-ref\",\"--hash\",\"master\"] + mordor has Operating System (Debian Unstable) \"i386\" ... ok + [2014-12-08 10:34:20 CET] read: apt-cache [\"policy\",\"etckeeper\"] + mordor apt installed etckeeper ... ok + [2014-12-08 10:34:21 CET] read: apt-cache [\"policy\",\"ssh\"] + mordor apt installed ssh ... ok + [2014-12-08 10:34:21 CET] read: passwd [\"-S\",\"root\"] + mordor root has password ... ok + [2014-12-08 10:34:21 CET] call: a2query [\"-q\",\"-s\",\"reprepro\"] + mordor create reprepro ... ok + mordor overall ... ok + +"""]] diff --git a/doc/forum/Apache.siteEnabled_doesn_not_update_the_apache_config_file/comment_3_531c2c5e78fb5c62e54d84231b129dc8._comment b/doc/forum/Apache.siteEnabled_doesn_not_update_the_apache_config_file/comment_3_531c2c5e78fb5c62e54d84231b129dc8._comment new file mode 100644 index 00000000..5dc67fb0 --- /dev/null +++ b/doc/forum/Apache.siteEnabled_doesn_not_update_the_apache_config_file/comment_3_531c2c5e78fb5c62e54d84231b129dc8._comment @@ -0,0 +1,11 @@ +[[!comment format=mdwn + username="picca" + subject="comment 3" + date="2014-12-08T10:47:59Z" + content=""" +I forgot to say that the content of + +/etc/apache2/site-xxx/reprepro[.conf] + +is unmodifed after this second run +"""]] diff --git a/doc/forum/Apache.siteEnabled_doesn_not_update_the_apache_config_file/comment_4_54281604c588a7229f9d987e8cdee802._comment b/doc/forum/Apache.siteEnabled_doesn_not_update_the_apache_config_file/comment_4_54281604c588a7229f9d987e8cdee802._comment new file mode 100644 index 00000000..a9201541 --- /dev/null +++ b/doc/forum/Apache.siteEnabled_doesn_not_update_the_apache_config_file/comment_4_54281604c588a7229f9d987e8cdee802._comment @@ -0,0 +1,16 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 4""" + date="2014-12-09T04:35:12Z" + content=""" +Pretty obvious why if you look at the code: + + enable = check (not <$> isenabled) $ + cmdProperty "a2ensite" ["--quiet", hn] + `describe` ("apache site enabled " ++ hn) + `requires` siteAvailable hn cf + +So that property was skipped entirely if the site was already enabled and never looked at the config file. + +I've put in a fix. +"""]] diff --git a/doc/forum/Propellor_without_superuser_privileges.mdwn b/doc/forum/Propellor_without_superuser_privileges.mdwn new file mode 100644 index 00000000..d7288a72 --- /dev/null +++ b/doc/forum/Propellor_without_superuser_privileges.mdwn @@ -0,0 +1,3 @@ +Joey uses propellor to popular his /home/joey on hosts he controls. I'd like to use it to populate my home directory on hosts where I don't have root. If someone gives me a shell account on a Debian box, it would be great to just run `propellor --spin` to have apply properties such as having certain stuff downloaded and compiled in `~/local/bin`, putting cronjobs in place, and checking stuff out with `myrepos`. + +Does propellor assume root access at a deep enough level that writing properties to do this stuff would be impractical? diff --git a/doc/forum/Propellor_without_superuser_privileges/comment_1_021ecbb1b8bd7e26776b49ec75e90d0c._comment b/doc/forum/Propellor_without_superuser_privileges/comment_1_021ecbb1b8bd7e26776b49ec75e90d0c._comment new file mode 100644 index 00000000..1a38ef94 --- /dev/null +++ b/doc/forum/Propellor_without_superuser_privileges/comment_1_021ecbb1b8bd7e26776b49ec75e90d0c._comment @@ -0,0 +1,26 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2014-12-26T19:26:00Z" + content=""" +I think that the root assumptions are in basically 3 places: + +* Many Properties assume they're run as root, and will fail if they're not. + Probably not a problem in practice for most of them. It might be nice + to make a few, such as `User.hasSomePassword` work when run as a normal + user. + +* Propellor's self-deployment involves running apt-get to instal ghc, + etc. This could be modified to check if it's not root and do a local + user of ghc if necessary. + +* `localdir = "/usr/local" and this is used in various places by eg, + `--spin`. It is, however, entirely possible to run "./propellor" in + some other directory, which causes it to run in that directory + and ensure the properties of localhost. `--spin` could certianly be + taught to run in a user mode where it uses "~/.propellor/" instead of + `localdir`. + +I think that's all! I don't plan to try to add this feature myself, but +will be happy to support anyone who wants to work on it. +"""]] diff --git a/doc/forum/Supported_OS.mdwn b/doc/forum/Supported_OS.mdwn new file mode 100644 index 00000000..f17b9054 --- /dev/null +++ b/doc/forum/Supported_OS.mdwn @@ -0,0 +1,5 @@ +What are the requirements for the configured OS ? Does it need to be Debian ? + +Would Propellor work for Arch linux, RHEL, Windows, AIX or linux on pSeries) ? + +Cheers diff --git a/doc/forum/Supported_OS/comment_1_f324bed708305e2667bd00f80544dd90._comment b/doc/forum/Supported_OS/comment_1_f324bed708305e2667bd00f80544dd90._comment new file mode 100644 index 00000000..3a2055ea --- /dev/null +++ b/doc/forum/Supported_OS/comment_1_f324bed708305e2667bd00f80544dd90._comment @@ -0,0 +1,23 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2014-12-07T15:58:03Z" + content=""" +I have heard of propellor being used on OSX. Probably that user wrote their +own code for OSX specific stuff. + +Propellor properites can be parameterized by OS. Currently it has support +for Debian and some untested support for Ubuntu. A property can be parameterized +like this: + + foo :: Property + foo = property "foo" withOS desc $ \o -> case o of + (Just (System (Debian _) _)) -> ensureProperty fooDebian + (Just (System (Ubuntu _) _)) -> ensureProperty fooUbuntu + +The first step for adding a new OS will be to modify <http://hackage.haskell.org/package/propellor-1.0.0/docs/Propellor-Types-OS.html>. +Compilation will then warn about all OS parameterized properties that +need to be updated to support your added OS, and it can be taken from there. + +I'll accept reasonable patches to support other OS's. +"""]] diff --git a/doc/forum/how_to_set_the_proxy_using_an_automatix_proxy.pac.mdwn b/doc/forum/how_to_set_the_proxy_using_an_automatix_proxy.pac.mdwn new file mode 100644 index 00000000..c88defcf --- /dev/null +++ b/doc/forum/how_to_set_the_proxy_using_an_automatix_proxy.pac.mdwn @@ -0,0 +1,12 @@ +Hello, + +I am trying propellor on Debian Jessie (haskell is fantastic for this sort or things) to setup one of my computer. + +On my network, the system administrator set proxies for http and https. +These information are available via a http://proxy/proxy.pac URL. + +So I would like to know what should be done to extract this information and set it for all users on the system ? + +Cheers + +Frederic diff --git a/doc/forum/how_to_set_the_proxy_using_an_automatix_proxy.pac/comment_1_69d7c8fb1d62300456575bb10e935d69._comment b/doc/forum/how_to_set_the_proxy_using_an_automatix_proxy.pac/comment_1_69d7c8fb1d62300456575bb10e935d69._comment new file mode 100644 index 00000000..6bf8844d --- /dev/null +++ b/doc/forum/how_to_set_the_proxy_using_an_automatix_proxy.pac/comment_1_69d7c8fb1d62300456575bb10e935d69._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2014-11-25T15:44:13Z" + content=""" +You could, for example, use Propellor.Propety.Cmd.cmdProperty +to run a command that sets up the proxying. If there's not a single command +that does it, you could cause propellor to fetch the url and deploy the +info itself. +"""]] diff --git a/doc/forum/how_to_set_the_proxy_using_an_automatix_proxy.pac/comment_2_da30b2621493e48ceabcfa5732dbcdf8._comment b/doc/forum/how_to_set_the_proxy_using_an_automatix_proxy.pac/comment_2_da30b2621493e48ceabcfa5732dbcdf8._comment new file mode 100644 index 00000000..8458ee49 --- /dev/null +++ b/doc/forum/how_to_set_the_proxy_using_an_automatix_proxy.pac/comment_2_da30b2621493e48ceabcfa5732dbcdf8._comment @@ -0,0 +1,19 @@ +[[!comment format=mdwn + username="picca" + subject="comment 2" + date="2014-11-25T17:55:25Z" + content=""" +In my case I need to wget the proxy.pac file and parse it to find the right proxy. + +what worried me is that these proxy.pac things are dynamical depending on the ip of the sender AND the receive. +It work nicely with web browser, but not with the unix http_proxy and HTTPS_PROXY env. + +nevertheless, I can create something to parse my local setup and extract the right http_proxy. + +Is there something available in Propellor to set a global environment variable in /etc/environment (the right place for this ?) + +cheers + +Frederic + +"""]] diff --git a/doc/forum/how_to_set_the_proxy_using_an_automatix_proxy.pac/comment_3_bd76d169af2ef2f154ad1f0f64506661._comment b/doc/forum/how_to_set_the_proxy_using_an_automatix_proxy.pac/comment_3_bd76d169af2ef2f154ad1f0f64506661._comment new file mode 100644 index 00000000..9bdcb4df --- /dev/null +++ b/doc/forum/how_to_set_the_proxy_using_an_automatix_proxy.pac/comment_3_bd76d169af2ef2f154ad1f0f64506661._comment @@ -0,0 +1,11 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2014-11-25T19:37:46Z" + content=""" +There's no Property that handles setting global environment currently, but +it's a reasonable one to add. + +I think that /etc/environment is read by `pam_env` logins, but maybe not +other things, so dunno. +"""]] diff --git a/doc/forum/how_to_set_the_proxy_using_an_automatix_proxy.pac/comment_4_a6a49d35ee8a05abc982049b55d0397c._comment b/doc/forum/how_to_set_the_proxy_using_an_automatix_proxy.pac/comment_4_a6a49d35ee8a05abc982049b55d0397c._comment new file mode 100644 index 00000000..d2a0b45e --- /dev/null +++ b/doc/forum/how_to_set_the_proxy_using_an_automatix_proxy.pac/comment_4_a6a49d35ee8a05abc982049b55d0397c._comment @@ -0,0 +1,11 @@ +[[!comment format=mdwn + username="picca" + subject="comment 4" + date="2014-11-25T20:01:12Z" + content=""" +I saw that there is an haskell binding for augeas. + +Maybe this could be a nice uniform interface to deal with all the system configuration files. +then no need to deal with the config file formats. + +"""]] diff --git a/doc/forum/how_to_set_the_proxy_using_an_automatix_proxy.pac/comment_5_7783b8a96c8032a39ff3b5b446a976ed._comment b/doc/forum/how_to_set_the_proxy_using_an_automatix_proxy.pac/comment_5_7783b8a96c8032a39ff3b5b446a976ed._comment new file mode 100644 index 00000000..d670fa3b --- /dev/null +++ b/doc/forum/how_to_set_the_proxy_using_an_automatix_proxy.pac/comment_5_7783b8a96c8032a39ff3b5b446a976ed._comment @@ -0,0 +1,7 @@ +[[!comment format=mdwn + username="gueux" + subject="comment 5" + date="2014-11-27T08:17:36Z" + content=""" +Just looked at augeas, and add it to propellor would be great. Much more robust than Propellor.Property.File.{containsLine,containsLines,lacksLine}, at least. +"""]] diff --git a/doc/forum/modify_managed_host_propellor__39__s_.git__47__config.mdwn b/doc/forum/modify_managed_host_propellor__39__s_.git__47__config.mdwn new file mode 100644 index 00000000..0815b4b3 --- /dev/null +++ b/doc/forum/modify_managed_host_propellor__39__s_.git__47__config.mdwn @@ -0,0 +1 @@ +How can I modify the configuration of a managed host (which seems to be stored in /usr/local/propellor/.git/config) from the host on which I run propellor? diff --git a/doc/forum/modify_managed_host_propellor__39__s_.git__47__config/comment_1_da3ebb4736a1f1012b6d27bcd33ff44f._comment b/doc/forum/modify_managed_host_propellor__39__s_.git__47__config/comment_1_da3ebb4736a1f1012b6d27bcd33ff44f._comment new file mode 100644 index 00000000..f034a377 --- /dev/null +++ b/doc/forum/modify_managed_host_propellor__39__s_.git__47__config/comment_1_da3ebb4736a1f1012b6d27bcd33ff44f._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2014-10-31T14:40:33Z" + content=""" +I'm curious what you need to configure there.. + +But, there seems to be a simple solution: Add a Property that configures +the .git/config however you need to! :) +"""]] diff --git a/doc/forum/propellor_with_no_central_repository__63__.mdwn b/doc/forum/propellor_with_no_central_repository__63__.mdwn new file mode 100644 index 00000000..5f322878 --- /dev/null +++ b/doc/forum/propellor_with_no_central_repository__63__.mdwn @@ -0,0 +1 @@ +Is there a way to use propellor with no central repository? diff --git a/doc/forum/propellor_with_no_central_repository__63__/comment_1_6a2a5068962b17dac08609cd65887f48._comment b/doc/forum/propellor_with_no_central_repository__63__/comment_1_6a2a5068962b17dac08609cd65887f48._comment new file mode 100644 index 00000000..1f1456c5 --- /dev/null +++ b/doc/forum/propellor_with_no_central_repository__63__/comment_1_6a2a5068962b17dac08609cd65887f48._comment @@ -0,0 +1,7 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2014-10-31T14:39:48Z" + content=""" +Not yet, but see [[todo/git_push_over_propellor_ssh_channel]] +"""]] diff --git a/doc/forum/propellor_with_no_central_repository__63__/comment_2_0f035bb4bb5cc13574394505f28abe5e._comment b/doc/forum/propellor_with_no_central_repository__63__/comment_2_0f035bb4bb5cc13574394505f28abe5e._comment new file mode 100644 index 00000000..6a6aa946 --- /dev/null +++ b/doc/forum/propellor_with_no_central_repository__63__/comment_2_0f035bb4bb5cc13574394505f28abe5e._comment @@ -0,0 +1,9 @@ +[[!comment format=mdwn + username="joey" + subject="""yay!""" + date="2014-11-19T01:31:14Z" + content=""" +propellor now supports this mode by default, just use `propellor --spin +hostname` and the changes in the local repo will be pushed and deployed to +the host, w/o needing a centralized git repo. +"""]] diff --git a/doc/forum/property_combinator_ordering.mdwn b/doc/forum/property_combinator_ordering.mdwn new file mode 100644 index 00000000..25549bb4 --- /dev/null +++ b/doc/forum/property_combinator_ordering.mdwn @@ -0,0 +1,8 @@ +when I write + + setDistribution cfg = f `File.hasContent` cfg + `onChange` update + `requires` File.dirExists confDir + +is update called before ensuring the confiDir Exist ? +It seems to me but who knows ? diff --git a/doc/forum/property_combinator_ordering/comment_1_0ea2186b5cfa7eadaf38ac2e97fc4a2c._comment b/doc/forum/property_combinator_ordering/comment_1_0ea2186b5cfa7eadaf38ac2e97fc4a2c._comment new file mode 100644 index 00000000..c41abd90 --- /dev/null +++ b/doc/forum/property_combinator_ordering/comment_1_0ea2186b5cfa7eadaf38ac2e97fc4a2c._comment @@ -0,0 +1,31 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2014-12-01T15:53:11Z" + content=""" +I think that should behave intuitively, but of course if you're unsure +of this kind of thing, adding parens is a good way to disambiguate the +code. + + (f `File.hasContent` cfg `onChange` update) + `requires` File.dirExists confDir + +Written that way, it's explicit that the parenthesized part runs +together as one action. + +Or, we can do a quick test in ghci: + + joey@darkstar:~/src/propellor/src#joeyconfig>ghci Propellor.hs Propellor/Property.hs + *Propellor> let f1 = property "hasContent" (liftIO (print "f1") >> return MadeChange) + *Propellor> let f2 = property "update" (liftIO (print "f2") >> return MadeChange) + *Propellor> let f3 = property "dirExists" (liftIO (print "f3") >> return MadeChange) + *Propellor> runPropellor (Host "foo" [] mempty) $ ensureProperty $ f1 `onChange` f2 `requires` f3 + "dirExists" + "hasContent" + "update" + MadeChange + +So, yes, it's behaving as it should, first ensuring that the `requires` +property is met, and then running the main property, and since it made a +change, following up by running the `onChange` property. +"""]] |
