From 2b2fea746f1b672e6eaed09a656a6b6332ead1b2 Mon Sep 17 00:00:00 2001 From: Alan McNea Date: Mon, 29 Jul 2013 21:29:41 +0000 Subject: [PATCH 01/12] Added my stuff --- fcgid.sls | 22 ++++++++++++++++++++++ init.sls | 46 ++++++++++++++++++++++++++++++++++++++++++++++ php5.sls | 33 +++++++++++++++++++++++++++++++++ register_site.sls | 46 ++++++++++++++++++++++++++++++++++++++++++++++ rewrite.sls | 12 ++++++++++++ 5 files changed, 159 insertions(+) create mode 100644 fcgid.sls create mode 100644 init.sls create mode 100644 php5.sls create mode 100644 register_site.sls create mode 100644 rewrite.sls diff --git a/fcgid.sls b/fcgid.sls new file mode 100644 index 0000000..cfe3986 --- /dev/null +++ b/fcgid.sls @@ -0,0 +1,22 @@ +include: + - core.apt + +{% if grains['os']=="Ubuntu" %} + +mod-fcgid: + pkg.installed: + - name: libapache2-mod-fcgid + - order: 180 + - require: + - pkg: apache2 + +a2enmod fcgid: + cmd.run: + - order: 225 + - unless: ls /etc/apache2/mods-enabled/fcgid.load + - require: + - pkg: mod-fcgid + - watch_in: + - cmd: apache2-restart + +{% endif %} diff --git a/init.sls b/init.sls new file mode 100644 index 0000000..43dfe7c --- /dev/null +++ b/init.sls @@ -0,0 +1,46 @@ +include: + - core.apt + - core.apache2.register_site + +{% if grains['os']=="Ubuntu" %} + +apache2: + pkg.installed: + - name: apache2 + - order: 175 + service.running: + - enable: True + - order: 455 + +a2dissite 000-default: + cmd.run: + - order: 225 + - onlyif: ls /etc/apache2/sites-enabled/000-default + - watch_in: + - cmd: apache2-reload + - require: + - pkg: apache2 + +apache2-reload: + cmd.wait: + - name: service apache2 reload + - order: 420 + +apache2-restart: + cmd.wait: + - name: service apache2 restart + - order: 425 + +/etc/apache2/sites-available/default: + file.absent: + - order: 230 + - require: + - pkg: apache2 + +/etc/apache2/sites-available/default-ssl: + file.absent: + - order: 230 + - require: + - pkg: apache2 + +{% endif %} #END: os = ubuntu diff --git a/php5.sls b/php5.sls new file mode 100644 index 0000000..a2c9893 --- /dev/null +++ b/php5.sls @@ -0,0 +1,33 @@ +include: + - core.apt + +{% if grains['os']=="Ubuntu" %} + +mod-php5: + pkg.installed: + - name: libapache2-mod-php5 + - order: 180 + - require: + - pkg: apache2 + +a2enmod php5: + cmd.run: + - unless: ls /etc/apache2/mods-enabled/php5.load + - require: + - pkg: mod-php5 + - watch_in: + - cmd: apache2-restart + +{% if 'apache2-php-ini' in pillar %} +/etc/php5/apache2/php.ini: + file.managed: + - source: {{ pillar['apache2-php-ini'] }} + - order: 225 + - watch_in: + - cmd: apache2-restart + - require: + - pkg: apache2 + - pkg: php5 +{% endif %} + +{% endif %} diff --git a/register_site.sls b/register_site.sls new file mode 100644 index 0000000..428b9d9 --- /dev/null +++ b/register_site.sls @@ -0,0 +1,46 @@ +{% if 'apache2-register-site' in pillar %} #BEGIN: apache2-register-site +{% for site in pillar['apache2-register-site'] %} + +#BEGIN: Call apache a2ensite +########################################## +{% if 'name' in pillar['apache2-register-site'][site] and 'state' in pillar['apache2-register-site'][site] %} + +{% if pillar['apache2-register-site'][site]['state'] == 'enabled' %} +a2ensite {{ pillar['apache2-register-site'][site]['name'] }}: +{% else %} +a2dissite {{ pillar['apache2-register-site'][site]['name'] }}: +{% endif %} + cmd.run: +{% if pillar['apache2-register-site'][site]['state'] == 'enabled' %} + - unless: ls /etc/apache2/sites-enabled/{{ pillar['apache2-register-site'][site]['name'] }} +{% else %} + - onlyif: ls /etc/apache2/sites-enabled/{{ pillar['apache2-register-site'][site]['name'] }} +{% endif %} + - order: 230 + - require: + - pkg: apache2 + - file: /etc/apache2/sites-available/{{ pillar['apache2-register-site'][site]['name'] }} + +{% endif %} +########################################## + +#BEGIN: Manage apache site config +########################################## +{% if 'name' in pillar['apache2-register-site'][site] and 'path' in pillar['apache2-register-site'][site] %} + +/etc/apache2/sites-available/{{ pillar['apache2-register-site'][site]['name'] }}: + file.managed: + - source: {{ pillar['apache2-register-site'][site]['path'] }} + - order: 225 + - user: root + - group: root + - mode: 775 + - watch_in: + - cmd: a2ensite {{ pillar['apache2-register-site'][site]['name'] }} + - cmd: apache2-reload + +{% endif %} +########################################## + +{% endfor %} +{% endif %} #END: apache2-register-site diff --git a/rewrite.sls b/rewrite.sls new file mode 100644 index 0000000..75e7b37 --- /dev/null +++ b/rewrite.sls @@ -0,0 +1,12 @@ +include: + - core.apt + +{% if grains['os']=="Ubuntu" %} + +a2enmod rewrite: + cmd.run: + - unless: ls /etc/apache2/mods-enabled/rewrite.load + - watch_in: + - cmd: apache2-restart + +{% endif %} From fdc593210df061061d0342bffc456748d3be5938 Mon Sep 17 00:00:00 2001 From: Alan McNea Date: Mon, 29 Jul 2013 21:30:14 +0000 Subject: [PATCH 02/12] Removed references to core --- fcgid.sls | 2 +- init.sls | 4 ++-- php5.sls | 2 +- rewrite.sls | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fcgid.sls b/fcgid.sls index cfe3986..1328b2b 100644 --- a/fcgid.sls +++ b/fcgid.sls @@ -1,5 +1,5 @@ include: - - core.apt + - apt {% if grains['os']=="Ubuntu" %} diff --git a/init.sls b/init.sls index 43dfe7c..a438e93 100644 --- a/init.sls +++ b/init.sls @@ -1,6 +1,6 @@ include: - - core.apt - - core.apache2.register_site + - apt + - apache2.register_site {% if grains['os']=="Ubuntu" %} diff --git a/php5.sls b/php5.sls index a2c9893..a35e239 100644 --- a/php5.sls +++ b/php5.sls @@ -1,5 +1,5 @@ include: - - core.apt + - apt {% if grains['os']=="Ubuntu" %} diff --git a/rewrite.sls b/rewrite.sls index 75e7b37..fd85758 100644 --- a/rewrite.sls +++ b/rewrite.sls @@ -1,5 +1,5 @@ include: - - core.apt + - apt {% if grains['os']=="Ubuntu" %} From c47ce1b533cc979b6b227f8a112b15f062ba3c45 Mon Sep 17 00:00:00 2001 From: Alan McNea Date: Mon, 29 Jul 2013 21:30:29 +0000 Subject: [PATCH 03/12] Changed apache2 refs to apache --- fcgid.sls | 4 ++-- init.sls | 16 ++++++++-------- php5.sls | 8 ++++---- register_site.sls | 4 ++-- rewrite.sls | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/fcgid.sls b/fcgid.sls index 1328b2b..895cffe 100644 --- a/fcgid.sls +++ b/fcgid.sls @@ -8,7 +8,7 @@ mod-fcgid: - name: libapache2-mod-fcgid - order: 180 - require: - - pkg: apache2 + - pkg: apache a2enmod fcgid: cmd.run: @@ -17,6 +17,6 @@ a2enmod fcgid: - require: - pkg: mod-fcgid - watch_in: - - cmd: apache2-restart + - cmd: apache-restart {% endif %} diff --git a/init.sls b/init.sls index a438e93..d30c86c 100644 --- a/init.sls +++ b/init.sls @@ -1,10 +1,10 @@ include: - apt - - apache2.register_site + - apache.register_site {% if grains['os']=="Ubuntu" %} -apache2: +apache: pkg.installed: - name: apache2 - order: 175 @@ -17,16 +17,16 @@ a2dissite 000-default: - order: 225 - onlyif: ls /etc/apache2/sites-enabled/000-default - watch_in: - - cmd: apache2-reload + - cmd: apache-reload - require: - - pkg: apache2 + - pkg: apache -apache2-reload: +apache-reload: cmd.wait: - name: service apache2 reload - order: 420 -apache2-restart: +apache-restart: cmd.wait: - name: service apache2 restart - order: 425 @@ -35,12 +35,12 @@ apache2-restart: file.absent: - order: 230 - require: - - pkg: apache2 + - pkg: apache /etc/apache2/sites-available/default-ssl: file.absent: - order: 230 - require: - - pkg: apache2 + - pkg: apache {% endif %} #END: os = ubuntu diff --git a/php5.sls b/php5.sls index a35e239..fd045eb 100644 --- a/php5.sls +++ b/php5.sls @@ -8,7 +8,7 @@ mod-php5: - name: libapache2-mod-php5 - order: 180 - require: - - pkg: apache2 + - pkg: apache a2enmod php5: cmd.run: @@ -16,7 +16,7 @@ a2enmod php5: - require: - pkg: mod-php5 - watch_in: - - cmd: apache2-restart + - cmd: apache-restart {% if 'apache2-php-ini' in pillar %} /etc/php5/apache2/php.ini: @@ -24,9 +24,9 @@ a2enmod php5: - source: {{ pillar['apache2-php-ini'] }} - order: 225 - watch_in: - - cmd: apache2-restart + - cmd: apache-restart - require: - - pkg: apache2 + - pkg: apache - pkg: php5 {% endif %} diff --git a/register_site.sls b/register_site.sls index 428b9d9..26d1f39 100644 --- a/register_site.sls +++ b/register_site.sls @@ -18,7 +18,7 @@ a2dissite {{ pillar['apache2-register-site'][site]['name'] }}: {% endif %} - order: 230 - require: - - pkg: apache2 + - pkg: apache - file: /etc/apache2/sites-available/{{ pillar['apache2-register-site'][site]['name'] }} {% endif %} @@ -37,7 +37,7 @@ a2dissite {{ pillar['apache2-register-site'][site]['name'] }}: - mode: 775 - watch_in: - cmd: a2ensite {{ pillar['apache2-register-site'][site]['name'] }} - - cmd: apache2-reload + - cmd: apache-reload {% endif %} ########################################## diff --git a/rewrite.sls b/rewrite.sls index fd85758..8e80faa 100644 --- a/rewrite.sls +++ b/rewrite.sls @@ -7,6 +7,6 @@ a2enmod rewrite: cmd.run: - unless: ls /etc/apache2/mods-enabled/rewrite.load - watch_in: - - cmd: apache2-restart + - cmd: apache-restart {% endif %} From e90f9ad3621b1e40f6591cf27c633dd38231ca20 Mon Sep 17 00:00:00 2001 From: Alan McNea Date: Mon, 29 Jul 2013 21:30:54 +0000 Subject: [PATCH 04/12] Changed apache2 pillar references to apache --- php5.sls | 4 ++-- register_site.sls | 30 +++++++++++++++--------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/php5.sls b/php5.sls index fd045eb..8e974e9 100644 --- a/php5.sls +++ b/php5.sls @@ -18,10 +18,10 @@ a2enmod php5: - watch_in: - cmd: apache-restart -{% if 'apache2-php-ini' in pillar %} +{% if 'apache-php-ini' in pillar %} /etc/php5/apache2/php.ini: file.managed: - - source: {{ pillar['apache2-php-ini'] }} + - source: {{ pillar['apache-php-ini'] }} - order: 225 - watch_in: - cmd: apache-restart diff --git a/register_site.sls b/register_site.sls index 26d1f39..038481b 100644 --- a/register_site.sls +++ b/register_site.sls @@ -1,46 +1,46 @@ -{% if 'apache2-register-site' in pillar %} #BEGIN: apache2-register-site -{% for site in pillar['apache2-register-site'] %} +{% if 'apache-register-site' in pillar %} #BEGIN: apache-register-site +{% for site in pillar['apache-register-site'] %} #BEGIN: Call apache a2ensite ########################################## -{% if 'name' in pillar['apache2-register-site'][site] and 'state' in pillar['apache2-register-site'][site] %} +{% if 'name' in pillar['apache-register-site'][site] and 'state' in pillar['apache-register-site'][site] %} -{% if pillar['apache2-register-site'][site]['state'] == 'enabled' %} -a2ensite {{ pillar['apache2-register-site'][site]['name'] }}: +{% if pillar['apache-register-site'][site]['state'] == 'enabled' %} +a2ensite {{ pillar['apache-register-site'][site]['name'] }}: {% else %} -a2dissite {{ pillar['apache2-register-site'][site]['name'] }}: +a2dissite {{ pillar['apache-register-site'][site]['name'] }}: {% endif %} cmd.run: -{% if pillar['apache2-register-site'][site]['state'] == 'enabled' %} - - unless: ls /etc/apache2/sites-enabled/{{ pillar['apache2-register-site'][site]['name'] }} +{% if pillar['apache-register-site'][site]['state'] == 'enabled' %} + - unless: ls /etc/apache2/sites-enabled/{{ pillar['apache-register-site'][site]['name'] }} {% else %} - - onlyif: ls /etc/apache2/sites-enabled/{{ pillar['apache2-register-site'][site]['name'] }} + - onlyif: ls /etc/apache2/sites-enabled/{{ pillar['apache-register-site'][site]['name'] }} {% endif %} - order: 230 - require: - pkg: apache - - file: /etc/apache2/sites-available/{{ pillar['apache2-register-site'][site]['name'] }} + - file: /etc/apache2/sites-available/{{ pillar['apache-register-site'][site]['name'] }} {% endif %} ########################################## #BEGIN: Manage apache site config ########################################## -{% if 'name' in pillar['apache2-register-site'][site] and 'path' in pillar['apache2-register-site'][site] %} +{% if 'name' in pillar['apache-register-site'][site] and 'path' in pillar['apache-register-site'][site] %} -/etc/apache2/sites-available/{{ pillar['apache2-register-site'][site]['name'] }}: +/etc/apache2/sites-available/{{ pillar['apache-register-site'][site]['name'] }}: file.managed: - - source: {{ pillar['apache2-register-site'][site]['path'] }} + - source: {{ pillar['apache-register-site'][site]['path'] }} - order: 225 - user: root - group: root - mode: 775 - watch_in: - - cmd: a2ensite {{ pillar['apache2-register-site'][site]['name'] }} + - cmd: a2ensite {{ pillar['apache-register-site'][site]['name'] }} - cmd: apache-reload {% endif %} ########################################## {% endfor %} -{% endif %} #END: apache2-register-site +{% endif %} #END: apache-register-site From 22dcf8ee1c5c81e329adfd9a91fb4a09bbc6c68e Mon Sep 17 00:00:00 2001 From: Alan McNea Date: Mon, 29 Jul 2013 21:31:15 +0000 Subject: [PATCH 05/12] Restructured pillar data --- php5.sls | 4 ++-- register_site.sls | 28 ++++++++++++++-------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/php5.sls b/php5.sls index 8e974e9..8218818 100644 --- a/php5.sls +++ b/php5.sls @@ -18,10 +18,10 @@ a2enmod php5: - watch_in: - cmd: apache-restart -{% if 'apache-php-ini' in pillar %} +{% if 'apache' in pillar and 'php-ini' in pillar['apache'] %} /etc/php5/apache2/php.ini: file.managed: - - source: {{ pillar['apache-php-ini'] }} + - source: {{ pillar['apache']['php-ini'] }} - order: 225 - watch_in: - cmd: apache-restart diff --git a/register_site.sls b/register_site.sls index 038481b..4857f53 100644 --- a/register_site.sls +++ b/register_site.sls @@ -1,42 +1,42 @@ -{% if 'apache-register-site' in pillar %} #BEGIN: apache-register-site -{% for site in pillar['apache-register-site'] %} +{% if 'apache' in pillar 'register-site' in pillar['apache'] %} #BEGIN: ['apache']['register-site'] +{% for site in pillar['apache']['register-site'] %} #BEGIN: Call apache a2ensite ########################################## -{% if 'name' in pillar['apache-register-site'][site] and 'state' in pillar['apache-register-site'][site] %} +{% if 'name' in pillar['apache']['register-site'][site] and 'state' in pillar['apache']['register-site'][site] %} -{% if pillar['apache-register-site'][site]['state'] == 'enabled' %} -a2ensite {{ pillar['apache-register-site'][site]['name'] }}: +{% if pillar['apache']['register-site'][site]['state'] == 'enabled' %} +a2ensite {{ pillar['apache']['register-site'][site]['name'] }}: {% else %} -a2dissite {{ pillar['apache-register-site'][site]['name'] }}: +a2dissite {{ pillar['apache']['register-site'][site]['name'] }}: {% endif %} cmd.run: -{% if pillar['apache-register-site'][site]['state'] == 'enabled' %} - - unless: ls /etc/apache2/sites-enabled/{{ pillar['apache-register-site'][site]['name'] }} +{% if pillar['apache']['register-site'][site]['state'] == 'enabled' %} + - unless: ls /etc/apache2/sites-enabled/{{ pillar['apache']['register-site'][site]['name'] }} {% else %} - - onlyif: ls /etc/apache2/sites-enabled/{{ pillar['apache-register-site'][site]['name'] }} + - onlyif: ls /etc/apache2/sites-enabled/{{ pillar['apache']['register-site'][site]['name'] }} {% endif %} - order: 230 - require: - pkg: apache - - file: /etc/apache2/sites-available/{{ pillar['apache-register-site'][site]['name'] }} + - file: /etc/apache2/sites-available/{{ pillar['apache']['register-site'][site]['name'] }} {% endif %} ########################################## #BEGIN: Manage apache site config ########################################## -{% if 'name' in pillar['apache-register-site'][site] and 'path' in pillar['apache-register-site'][site] %} +{% if 'name' in pillar['apache']['register-site'][site] and 'path' in pillar['apache']['register-site'][site] %} -/etc/apache2/sites-available/{{ pillar['apache-register-site'][site]['name'] }}: +/etc/apache2/sites-available/{{ pillar['apache']['register-site'][site]['name'] }}: file.managed: - - source: {{ pillar['apache-register-site'][site]['path'] }} + - source: {{ pillar['apache']['register-site'][site]['path'] }} - order: 225 - user: root - group: root - mode: 775 - watch_in: - - cmd: a2ensite {{ pillar['apache-register-site'][site]['name'] }} + - cmd: a2ensite {{ pillar['apache']['register-site'][site]['name'] }} - cmd: apache-reload {% endif %} From 545dccfa250d55e9a4bb648f6dfe39d5de0ea061 Mon Sep 17 00:00:00 2001 From: Alan McNea Date: Mon, 29 Jul 2013 21:31:38 +0000 Subject: [PATCH 06/12] Added name to apache service --- init.sls | 1 + 1 file changed, 1 insertion(+) diff --git a/init.sls b/init.sls index d30c86c..eb186cd 100644 --- a/init.sls +++ b/init.sls @@ -9,6 +9,7 @@ apache: - name: apache2 - order: 175 service.running: + - name: apache2 - enable: True - order: 455 From edf0cba2a437cce841c64bfe411dae66fda57fe4 Mon Sep 17 00:00:00 2001 From: Alan McNea Date: Mon, 29 Jul 2013 21:32:01 +0000 Subject: [PATCH 07/12] Bug fix --- register_site.sls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/register_site.sls b/register_site.sls index 4857f53..65eb618 100644 --- a/register_site.sls +++ b/register_site.sls @@ -1,4 +1,4 @@ -{% if 'apache' in pillar 'register-site' in pillar['apache'] %} #BEGIN: ['apache']['register-site'] +{% if 'apache' in pillar and 'register-site' in pillar['apache'] %} #BEGIN: ['apache']['register-site'] {% for site in pillar['apache']['register-site'] %} #BEGIN: Call apache a2ensite From 182d4f9d9cc6fb14e82a69e344fc66238522870d Mon Sep 17 00:00:00 2001 From: Alan McNea Date: Mon, 29 Jul 2013 21:32:16 +0000 Subject: [PATCH 08/12] Added some missing order statements --- php5.sls | 1 + rewrite.sls | 1 + 2 files changed, 2 insertions(+) diff --git a/php5.sls b/php5.sls index 8218818..b6b5710 100644 --- a/php5.sls +++ b/php5.sls @@ -13,6 +13,7 @@ mod-php5: a2enmod php5: cmd.run: - unless: ls /etc/apache2/mods-enabled/php5.load + - order: 225 - require: - pkg: mod-php5 - watch_in: diff --git a/rewrite.sls b/rewrite.sls index 8e80faa..958c74a 100644 --- a/rewrite.sls +++ b/rewrite.sls @@ -6,6 +6,7 @@ include: a2enmod rewrite: cmd.run: - unless: ls /etc/apache2/mods-enabled/rewrite.load + - order: 225 - watch_in: - cmd: apache-restart From d8c2bc9c7d3d4aa0b7a19241110b09b2fb8862c1 Mon Sep 17 00:00:00 2001 From: Alan McNea Date: Mon, 29 Jul 2013 21:32:34 +0000 Subject: [PATCH 09/12] Updated readme --- README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..0a2b056 --- /dev/null +++ b/README.md @@ -0,0 +1,38 @@ +apache +====== +DEPENDENCIES: + These salt-states are required: + 1) apt + +POSSIBLE DEPENDENCIES + These salt-states may be required depending on what your doing: + 1) php + +ORDERING: + +The ordering of the states for apache falls into block ranges which are: + 1) apache will use 1-500 for ordering + 2) apache will reserve 1 -100 as unused + 3) apache will reserve 101-150 for pre pkg install + 4) apache will reserve 151-200 for pkg install + 5) apache will reserve 201-250 for pkg configure + 6) apache will reserve 251-300 for downloads, git stuff, load data + 7) apache will reserve 301-400 for unknown purposes + 8) apache will reserve 401-450 for service restart-reloads + 9) apache WILL reserve 451-460 for service.running + 10) apache will reserve 461-500 for cmd requiring operational services + +PILLARS: + + 1) No pillar data is required + 2) Full pillar structure: + +apache: + php-ini: 'salt://path/to/file/php.ini' + register-site: + {{UNQIUE}}: + name: 'my name' + path: 'salt://path/to/sites-available/conf/file' + state: 'enabled' + + 3) UNIQUE can be any name as an array index, and you can duplicate this section From 2d7406b5fc1c28904900dc9679de881f203d82c2 Mon Sep 17 00:00:00 2001 From: Alan McNea Date: Mon, 29 Jul 2013 21:32:49 +0000 Subject: [PATCH 10/12] Changed spaces to tabs --- README.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 0a2b056..f7f99da 100644 --- a/README.md +++ b/README.md @@ -11,16 +11,17 @@ POSSIBLE DEPENDENCIES ORDERING: The ordering of the states for apache falls into block ranges which are: - 1) apache will use 1-500 for ordering - 2) apache will reserve 1 -100 as unused - 3) apache will reserve 101-150 for pre pkg install - 4) apache will reserve 151-200 for pkg install - 5) apache will reserve 201-250 for pkg configure - 6) apache will reserve 251-300 for downloads, git stuff, load data - 7) apache will reserve 301-400 for unknown purposes - 8) apache will reserve 401-450 for service restart-reloads - 9) apache WILL reserve 451-460 for service.running - 10) apache will reserve 461-500 for cmd requiring operational services + + 1) apache will use 1-500 for ordering + 2) apache will reserve 1 -100 as unused + 3) apache will reserve 101-150 for pre pkg install + 4) apache will reserve 151-200 for pkg install + 5) apache will reserve 201-250 for pkg configure + 6) apache will reserve 251-300 for downloads, git stuff, load data + 7) apache will reserve 301-400 for unknown purposes + 8) apache will reserve 401-450 for service restart-reloads + 9) apache WILL reserve 451-460 for service.running + 10) apache will reserve 461-500 for cmd requiring operational services PILLARS: From 66c94a5ad3a5e1fbe1c60494cf95477303e892ee Mon Sep 17 00:00:00 2001 From: Alan McNea Date: Mon, 29 Jul 2013 21:33:06 +0000 Subject: [PATCH 11/12] Fixed up readme a little --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index f7f99da..8cd058d 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,12 @@ apache ====== DEPENDENCIES: These salt-states are required: + 1) apt POSSIBLE DEPENDENCIES These salt-states may be required depending on what your doing: + 1) php ORDERING: From 64ff39395448dde4de5a9af74c01d286045a0dd4 Mon Sep 17 00:00:00 2001 From: Alan McNea Date: Mon, 29 Jul 2013 21:34:54 +0000 Subject: [PATCH 12/12] Moved README.md to README.rst --- README.md | 41 ----------------------------------------- README.rst | 43 +++++++++++++++++++++++++++++++++++++++---- 2 files changed, 39 insertions(+), 45 deletions(-) delete mode 100644 README.md diff --git a/README.md b/README.md deleted file mode 100644 index 8cd058d..0000000 --- a/README.md +++ /dev/null @@ -1,41 +0,0 @@ -apache -====== -DEPENDENCIES: - These salt-states are required: - - 1) apt - -POSSIBLE DEPENDENCIES - These salt-states may be required depending on what your doing: - - 1) php - -ORDERING: - -The ordering of the states for apache falls into block ranges which are: - - 1) apache will use 1-500 for ordering - 2) apache will reserve 1 -100 as unused - 3) apache will reserve 101-150 for pre pkg install - 4) apache will reserve 151-200 for pkg install - 5) apache will reserve 201-250 for pkg configure - 6) apache will reserve 251-300 for downloads, git stuff, load data - 7) apache will reserve 301-400 for unknown purposes - 8) apache will reserve 401-450 for service restart-reloads - 9) apache WILL reserve 451-460 for service.running - 10) apache will reserve 461-500 for cmd requiring operational services - -PILLARS: - - 1) No pillar data is required - 2) Full pillar structure: - -apache: - php-ini: 'salt://path/to/file/php.ini' - register-site: - {{UNQIUE}}: - name: 'my name' - path: 'salt://path/to/sites-available/conf/file' - state: 'enabled' - - 3) UNIQUE can be any name as an array index, and you can duplicate this section diff --git a/README.rst b/README.rst index 187bead..8cd058d 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,41 @@ apache -===== +====== +DEPENDENCIES: + These salt-states are required: -init.sls ------ -- Installs apache2 on `ubuntu 12.04` + 1) apt + +POSSIBLE DEPENDENCIES + These salt-states may be required depending on what your doing: + + 1) php + +ORDERING: + +The ordering of the states for apache falls into block ranges which are: + + 1) apache will use 1-500 for ordering + 2) apache will reserve 1 -100 as unused + 3) apache will reserve 101-150 for pre pkg install + 4) apache will reserve 151-200 for pkg install + 5) apache will reserve 201-250 for pkg configure + 6) apache will reserve 251-300 for downloads, git stuff, load data + 7) apache will reserve 301-400 for unknown purposes + 8) apache will reserve 401-450 for service restart-reloads + 9) apache WILL reserve 451-460 for service.running + 10) apache will reserve 461-500 for cmd requiring operational services + +PILLARS: + + 1) No pillar data is required + 2) Full pillar structure: + +apache: + php-ini: 'salt://path/to/file/php.ini' + register-site: + {{UNQIUE}}: + name: 'my name' + path: 'salt://path/to/sites-available/conf/file' + state: 'enabled' + + 3) UNIQUE can be any name as an array index, and you can duplicate this section