Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F11706699
D3665.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D3665.diff
View Options
diff --git a/_tests/Makefile b/_tests/Makefile
--- a/_tests/Makefile
+++ b/_tests/Makefile
@@ -7,7 +7,6 @@
test-bats:
bats scripts/bats/test_edit_acme_dns_accounts.sh
- bats roles/bats/test_webserver_content.sh
# -------------------------------------------------------------
# Configuration test specific to the primary server
diff --git a/_tests/roles/bats/test_webserver_content.sh b/_tests/roles/bats/test_webserver_content.sh
deleted file mode 100755
--- a/_tests/roles/bats/test_webserver_content.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env bats
-
-SCRIPT="utils/generate-webcontent-index.py"
-INDEX="roles/webserver-content/init.sls"
-
-@test "Ensure webserver-content index is up-to-date" {
- cd ..
- run diff -u <($SCRIPT) <(cat $INDEX)
- [ "$status" -eq 0 ]
-}
diff --git a/utils/generate-webcontent-index.py b/utils/generate-webcontent-index.py
deleted file mode 100755
--- a/utils/generate-webcontent-index.py
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/usr/bin/env python3
-
-# -------------------------------------------------------------
-# rOPS — regenerate roles/webserver-content/init.sls
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-# Project: Nasqueron
-# Created: 2017-11-24
-# Description: Read the web_content_sls pillar entry
-# and regenerate the webserver-content include.
-# License: BSD-2-Clause
-# -------------------------------------------------------------
-
-
-import yaml
-
-
-# -------------------------------------------------------------
-# Table of contents
-# -------------------------------------------------------------
-#
-# :: Configuration
-# :: Update code
-# :: Run task
-#
-# -------------------------------------------------------------
-
-# -------------------------------------------------------------
-# Configuration
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-config = {
- "header": "_resources/headers/webserver-content-init",
- "pillar": "pillar/webserver/sites.sls",
- "states": "roles/webserver-content/init.sls",
-}
-
-
-# -------------------------------------------------------------
-# Update code
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-def do_update(header_file, pillar_file, file_to_update):
- print_file(header_file)
-
- print("\ninclude:")
- for site in get_sites(pillar_file):
- print(" - {}".format(site))
- print("")
- print(" - ._generic")
-
-
-def get_pillar_entry(pillar_file, key):
- with open(pillar_file) as fd:
- pillar = yaml.safe_load(fd.read())
- return pillar[key]
-
-
-def get_sites(pillar_file):
- sites = get_pillar_entry(pillar_file, "web_content_sls")
- return sorted(set(
- [site for sublist in [sites[role] for role in sites] for site in sublist]
- ))
-
-
-def print_file(file_path):
- with open(file_path) as fd:
- for line in fd:
- if not line.startswith("#"):
- break
- print(line, end="")
-
-# -------------------------------------------------------------
-# Run task
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-if __name__ == "__main__":
- do_update(config["header"], config["pillar"], config["states"])
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Sep 13, 23:34 (7 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2983437
Default Alt Text
D3665.diff (3 KB)
Attached To
Mode
D3665: Prune unused webserver-content index generator
Attached
Detach File
Event Timeline
Log In to Comment