Compare commits

..

1 Commits

Author SHA1 Message Date
Christer Warén
a745685594 Add Nextcloud tasks in Deployer 2025-09-12 09:28:59 +03:00
33 changed files with 307 additions and 1252 deletions

View File

@@ -1,4 +1,4 @@
# TIETOJÄRJESTELMÄASENTAJIEN INFRA # Tietojärjestelmäasentajien Infra
## Ylläpitäjän ohjeet ## Ylläpitäjän ohjeet
**Työaseman asennus** **Työaseman asennus**
@@ -18,16 +18,14 @@
2. Vaihda oletusarvoinen käyttöjärjestelmä `wsl --set-default Debian` 2. Vaihda oletusarvoinen käyttöjärjestelmä `wsl --set-default Debian`
3. Käynnistä uudelleen käyttöjärjestelmä `wsl -t Debian` 3. Käynnistä uudelleen käyttöjärjestelmä `wsl -t Debian`
4. Sulje ikkuna 4. Sulje ikkuna
6. Avaa Debian käynnistävalikosta tai suorita Powershellissä komento järjestelmänvalvojana `wsl -d Debian` 6. Avaa Debian käynnistävalikosta tai suorita Powershellissä komento järjestelmänvalvojana `wsl -d Debian`
7. Kohota oikeudet `sudo su` 7. Asenna curl-paketti käyttämällä APT-paketinhallintaa `sudo apt update && sudo apt install curl`
8. Asenna curl-paketti käyttämällä APT-paketinhallintaa `apt update && apt install curl` 8. Lataa ja suorita Init.sh skripti `bash <(curl https://raw.githubusercontent.com/cwchristerw/tjas-infra/refs/heads/master/init.sh)`
9. Lataa ja suorita Init.sh skripti `bash <(curl https://raw.githubusercontent.com/cwchristerw/tjas-infra/refs/heads/master/init.sh)`
**Palvelimen asennus** **Palvelimen asennus**
1. Asenna Debian-käyttöjärjestelmä 1. Asenna Debian-käyttöjärjestelmä
2. Kirjaudu root käyttäjänä tai kohota oikeudet `sudo su` 2. Asenna curl-paketti käyttämällä APT-paketinhallintaa `apt update && apt install curl`
3. Asenna curl-paketti käyttämällä APT-paketinhallintaa `apt update && apt install curl` 3. Lataa ja suorita Init.sh skripti `bash <(curl https://raw.githubusercontent.com/cwchristerw/tjas-infra/refs/heads/master/init.sh)`
4. Lataa ja suorita Init.sh skripti `bash <(curl https://raw.githubusercontent.com/cwchristerw/tjas-infra/refs/heads/master/init.sh)`
**Verkkolaitteiden konfigurointi** **Verkkolaitteiden konfigurointi**
1. Kytke verkkolaitteen Console (Ethernet) porttiin serial portti adapteri sekä yhdistä siihen serial portti USB-adapteri 1. Kytke verkkolaitteen Console (Ethernet) porttiin serial portti adapteri sekä yhdistä siihen serial portti USB-adapteri
@@ -157,7 +155,7 @@ banner motd ^C
`--' `-----' `--' `--' `-----' `--' `-----' `--' `--' `-----'
TIETOJÄRJESTELMÄASENTAJIEN INFRA PVJJK 1.VOS NIINISALO
r1.net.tjas r1.net.tjas
^C ^C
@@ -219,7 +217,7 @@ banner motd "
`--' `-----' `--' `--' `-----' `--' `-----' `--' `--' `-----'
TIETOJÄRJESTELMÄASENTAJIEN INFRA PVJJK 1.VOS NIINISALO
s1.net.tjas s1.net.tjas
" "
@@ -330,7 +328,7 @@ banner motd "
`--' `-----' `--' `--' `-----' `--' `-----' `--' `--' `-----'
TIETOJÄRJESTELMÄASENTAJIEN INFRA PVJJK 1.VOS NIINISALO
s2.net.tjas s2.net.tjas
" "
@@ -409,7 +407,7 @@ banner motd "
`--' `-----' `--' `--' `-----' `--' `-----' `--' `--' `-----'
TIETOJÄRJESTELMÄASENTAJIEN INFRA PVJJK 1.VOS NIINISALO
s3.net.tjas s3.net.tjas
" "

View File

@@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2025-2026 Christer Warén & Warén Group Copyright (c) 2025 Christer Warén & Warén Group
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.

View File

@@ -1,5 +1,5 @@
[defaults] [defaults]
inventory = inventories inventory = inventories/pvjjk-1vos-niinisalo
hash_behaviour = merge hash_behaviour = merge
gathering = smart gathering = smart
display_skipped_hosts = false display_skipped_hosts = false

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -1,274 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="695.94501"
height="695.94501"
viewBox="0 0 184.13545 184.13545"
version="1.1"
id="svg1"
sodipodi:docname="logo-square.svg"
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
inkscape:export-filename="logo-square.png"
inkscape:export-xdpi="96.010002"
inkscape:export-ydpi="96.010002"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
inkscape:zoom="1.44"
inkscape:cx="329.51389"
inkscape:cy="169.44444"
inkscape:window-width="1920"
inkscape:window-height="1008"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs1">
<linearGradient
id="linearGradient1"
inkscape:collect="always">
<stop
style="stop-color:#c84dff;stop-opacity:1;"
offset="0"
id="stop1" />
<stop
style="stop-color:#ad00fa;stop-opacity:1;"
offset="0.20007552"
id="stop3" />
<stop
style="stop-color:#c84dff;stop-opacity:1;"
offset="0.36412308"
id="stop4" />
<stop
style="stop-color:#8800c4;stop-opacity:1;"
offset="0.49973571"
id="stop5" />
<stop
style="stop-color:#c84dff;stop-opacity:1;"
offset="0.82178771"
id="stop6" />
<stop
style="stop-color:#58007e;stop-opacity:1;"
offset="1"
id="stop2" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient1"
id="linearGradient2"
x1="25.938683"
y1="80.4786"
x2="25.641027"
y2="115.3044"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient1"
id="linearGradient3"
gradientUnits="userSpaceOnUse"
x1="25.938683"
y1="80.4786"
x2="25.641027"
y2="115.3044" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient1"
id="linearGradient4"
gradientUnits="userSpaceOnUse"
x1="25.938683"
y1="80.4786"
x2="25.641027"
y2="115.3044" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient1"
id="linearGradient5"
gradientUnits="userSpaceOnUse"
x1="25.938683"
y1="80.4786"
x2="25.641027"
y2="115.3044" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient1"
id="linearGradient6"
gradientUnits="userSpaceOnUse"
x1="25.938683"
y1="80.4786"
x2="25.641027"
y2="115.3044" />
</defs>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(1.7166583e-5,54.181246)">
<g
id="g9"
style="display:none"
transform="translate(-8.8234898,-66.083592)">
<g
id="g7">
<text
xml:space="preserve"
style="font-size:22.5778px;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;direction:ltr;text-anchor:middle;fill:#000000;stroke-width:0.264583"
x="39.283604"
y="115.8997"
id="text1"><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:50.8px;font-family:'Luckiest Guy';-inkscape-font-specification:'Luckiest Guy';text-align:center;letter-spacing:0px;text-anchor:middle;stroke-width:0.264583"
x="39.283604"
y="115.8997"
id="tspan5">T</tspan></text>
<text
xml:space="preserve"
style="font-size:22.5778px;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;direction:ltr;text-anchor:middle;fill:#000000;stroke-width:0.264583"
x="79.859314"
y="115.52763"
id="text1-1"><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:50.8px;font-family:'Luckiest Guy';-inkscape-font-specification:'Luckiest Guy';text-align:center;letter-spacing:0px;text-anchor:middle;stroke-width:0.264583"
x="79.859314"
y="115.52763"
id="tspan5-8">J</tspan></text>
<text
xml:space="preserve"
style="font-size:22.5778px;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;direction:ltr;text-anchor:middle;fill:#000000;stroke-width:0.264583"
x="122.32855"
y="115.8997"
id="text1-28"><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:50.8px;font-family:'Luckiest Guy';-inkscape-font-specification:'Luckiest Guy';text-align:center;letter-spacing:0px;text-anchor:middle;stroke-width:0.264583"
x="122.32855"
y="115.8997"
id="tspan5-9">A</tspan></text>
<text
xml:space="preserve"
style="font-size:22.5778px;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;direction:ltr;text-anchor:middle;fill:#000000;stroke-width:0.264583"
x="161.78362"
y="116.07333"
id="text1-2"><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:50.8px;font-family:'Luckiest Guy';-inkscape-font-specification:'Luckiest Guy';text-align:center;letter-spacing:0px;text-anchor:middle;stroke-width:0.264583"
x="161.78362"
y="116.07333"
id="tspan5-3">S</tspan></text>
</g>
<g
id="g8"
style="stroke:none">
<text
xml:space="preserve"
style="font-size:22.5778px;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;direction:ltr;text-anchor:middle;fill:#000000;stroke:none;stroke-width:0.264583"
x="39.344238"
y="128.46199"
id="text1-3-2"><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:11.2889px;font-family:'Luckiest Guy';-inkscape-font-specification:'Luckiest Guy';text-align:center;text-anchor:middle;stroke:none;stroke-width:0.264583"
x="39.344238"
y="128.46199"
id="tspan5-2-9">TANGO</tspan></text>
<text
xml:space="preserve"
style="font-size:22.5778px;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;direction:ltr;text-anchor:middle;fill:#000000;stroke:none;stroke-width:0.264583"
x="79.264"
y="128.3297"
id="text1-3"><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:11.2889px;font-family:'Luckiest Guy';-inkscape-font-specification:'Luckiest Guy';text-align:center;text-anchor:middle;stroke:none;stroke-width:0.264583"
x="79.264"
y="128.3297"
id="tspan5-2">JULIET</tspan></text>
<text
xml:space="preserve"
style="font-size:22.5778px;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;direction:ltr;text-anchor:middle;fill:#000000;stroke:none;stroke-width:0.264583"
x="122.30926"
y="128.43994"
id="text1-3-7"><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:11.2889px;font-family:'Luckiest Guy';-inkscape-font-specification:'Luckiest Guy';text-align:center;text-anchor:middle;stroke:none;stroke-width:0.264583"
x="122.30926"
y="128.43994"
id="tspan5-2-8">ALPHA</tspan></text>
<text
xml:space="preserve"
style="font-size:22.5778px;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;direction:ltr;text-anchor:middle;fill:#000000;stroke:none;stroke-width:0.264583"
x="161.81256"
y="128.5116"
id="text1-3-6"><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:11.2889px;font-family:'Luckiest Guy';-inkscape-font-specification:'Luckiest Guy';text-align:center;text-anchor:middle;stroke:none;stroke-width:0.264583"
x="161.81256"
y="128.5116"
id="tspan5-2-1">SIERRA</tspan></text>
</g>
</g>
<g
id="g17"
style="display:inline;fill:#f9f9f9;stroke:#000000;stroke-width:2.64583;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
transform="translate(-8.8234921,-66.083609)">
<g
id="g12"
style="fill:url(#linearGradient2);stroke:#000000;stroke-width:2.64583;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers">
<path
style="font-size:50.8px;font-family:'Luckiest Guy';-inkscape-font-specification:'Luckiest Guy';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:url(#linearGradient3);stroke:#000000;stroke-width:2.64583;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
d="m 52.975791,80.428994 -0.248047,10.517187 -7.391797,0.297656 -1.885156,23.514843 -10.467578,0.5457 0.04961,-23.51484 -7.391797,0.396875 0.297656,-11.707812 z"
id="text9"
aria-label="T" />
<path
style="font-size:50.8px;font-family:'Luckiest Guy';-inkscape-font-specification:'Luckiest Guy';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:url(#linearGradient4);stroke:#000000;stroke-width:2.64583;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
d="m 91.864783,95.088571 q 0,1.463477 0,2.902149 0,1.438672 -0.148829,2.90215 -0.272851,3.10058 -1.339453,5.87871 -1.066601,2.75332 -2.902148,4.83691 -1.810742,2.0836 -4.415234,3.29903 -2.604493,1.21543 -5.97793,1.21543 -1.314648,0 -2.75332,-0.22325 -1.413867,-0.22324 -2.827735,-0.66972 -1.389062,-0.44649 -2.678906,-1.09141 -1.265039,-0.66973 -2.257226,-1.53789 l 1.53789,-10.26914 q 1.463477,1.41387 3.249414,2.30684 1.785938,0.86816 3.894336,0.86816 1.364258,0 2.306836,-0.39687 0.942578,-0.39688 1.562695,-1.09141 0.620118,-0.69453 0.967383,-1.61231 0.37207,-0.94257 0.520899,-1.98437 0.173632,-1.066602 0.198437,-2.182813 0.04961,-1.116211 0.04961,-2.207617 0,-3.943946 -0.396875,-7.838282 -0.396875,-3.91914 -0.694531,-7.838281 l 11.360547,-0.74414 q 0.744141,7.739062 0.74414,15.478124 z"
id="text10"
aria-label="J" />
<path
style="font-size:50.8px;font-family:'Luckiest Guy';-inkscape-font-specification:'Luckiest Guy';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:url(#linearGradient5);stroke:#000000;stroke-width:2.64583;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
d="m 138.9725,113.76649 -12.30313,1.5875 -1.48828,-5.60586 h -5.65547 l -1.24023,5.60586 -12.65039,-1.24023 9.87226,-33.039844 13.79141,-0.694532 z m -14.68438,-11.60859 -1.88515,-8.632031 -1.83555,8.632031 z"
id="text11"
aria-label="A" />
<path
style="font-size:50.8px;font-family:'Luckiest Guy';-inkscape-font-specification:'Luckiest Guy';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:url(#linearGradient6);stroke:#000000;stroke-width:2.64583;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
d="m 174.96731,102.87724 q 0,3.39824 -1.19063,5.95313 -1.16582,2.53007 -3.22461,4.21679 -2.03398,1.68672 -4.7873,2.53008 -2.72852,0.84336 -5.87871,0.84336 -1.21543,0 -2.67891,-0.32246 -1.43867,-0.32246 -2.92695,-0.79375 -1.48828,-0.4961 -2.87735,-1.0418 -1.36425,-0.57051 -2.43086,-1.0666 l 1.09141,-10.21953 q 2.1084,1.26504 4.66328,1.93476 2.57969,0.64493 5.06016,0.64493 0.47129,0 1.14101,-0.0248 0.66973,-0.0496 1.26504,-0.22324 0.62012,-0.19844 1.0418,-0.57051 0.42168,-0.37207 0.42168,-1.0666 0,-0.47129 -0.29766,-0.79375 -0.29765,-0.34727 -0.76894,-0.5457 -0.47129,-0.22325 -1.0666,-0.32246 -0.59532,-0.12403 -1.16582,-0.17364 -0.57051,-0.0496 -1.06661,-0.0496 -0.49609,0 -0.79375,0 -2.1332,0 -3.89433,-0.74414 -1.73633,-0.74414 -3.00137,-2.058786 -1.24023,-1.339453 -1.93476,-3.150195 -0.69454,-1.835547 -0.69454,-3.96875 0,-2.926953 1.16582,-5.233789 1.19063,-2.33164 3.1502,-3.943945 1.98437,-1.637109 4.53926,-2.505274 2.55488,-0.868164 5.2834,-0.868164 1.21543,0 2.50527,0.09922 1.28984,0.07441 2.55488,0.297656 1.28985,0.223243 2.50528,0.570508 1.21543,0.347266 2.30683,0.868164 l -0.94258,10.070703 q -1.68672,-0.570508 -3.54707,-0.942578 -1.83554,-0.396875 -3.59668,-0.396875 -0.32246,0 -0.84336,0.02481 -0.49609,0 -1.0666,0.07441 -0.5457,0.04961 -1.11621,0.173633 -0.57051,0.124023 -1.01699,0.347265 -0.44649,0.198438 -0.71934,0.545703 -0.27285,0.347266 -0.24804,0.818555 0.0248,0.545703 0.39687,0.892969 0.39688,0.322461 0.99219,0.520898 0.62012,0.173633 1.33945,0.248047 0.74414,0.07441 1.46348,0.09922 0.71933,0 1.33945,0 0.62012,-0.02481 1.01699,0.02481 1.98438,0.124023 3.57188,0.843359 1.5875,0.719336 2.67891,1.909961 1.11621,1.190625 1.68671,2.852539 0.59532,1.637116 0.59532,3.621486 z"
id="text12"
aria-label="S" />
</g>
<g
id="g16"
style="fill:#f9f9f9;stroke:#000000;stroke-width:2.64583;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers">
<path
style="font-size:11.2889px;font-family:'Luckiest Guy';-inkscape-font-specification:'Luckiest Guy';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#f9f9f9;stroke:#000000;stroke-width:2.64583;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
d="m 28.126996,120.5796 -0.05512,2.33716 -1.642623,0.0661 -0.418924,5.22553 -2.326131,0.12127 0.01103,-5.22553 -1.642624,0.0882 0.06615,-2.60174 z m 6.493322,7.40834 -2.73403,0.35278 -0.33073,-1.24574 h -1.256772 l -0.275608,1.24574 -2.8112,-0.27561 2.193839,-7.34219 3.06476,-0.15434 z m -3.263197,-2.57969 -0.418924,-1.91823 -0.4079,1.91823 z m 10.875488,-4.85069 -0.396876,7.47448 -2.888371,0.26459 -1.543404,-4.00183 -0.242535,4.079 h -2.480471 l 0.198437,-7.81624 2.756079,-0.1323 1.907207,3.96876 0.08819,-3.74827 z m 7.099659,6.77995 q -0.259071,0.32522 -0.63941,0.56775 -0.380339,0.24254 -0.8158,0.40239 -0.43546,0.15985 -0.892969,0.23702 -0.457509,0.0827 -0.870921,0.0827 -0.799263,0 -1.471747,-0.28664 -0.672483,-0.28663 -1.163065,-0.78824 -0.48507,-0.50711 -0.760678,-1.19062 -0.275608,-0.68351 -0.275608,-1.47175 0,-0.60082 0.137804,-1.17409 0.137804,-0.57877 0.391363,-1.08589 0.259072,-0.51263 0.628386,-0.93707 0.369315,-0.42995 0.837849,-0.73863 0.468533,-0.30868 1.025261,-0.47956 0.556728,-0.17087 1.190626,-0.17087 0.237023,0 0.507119,0.022 0.270096,0.0165 0.534679,0.0661 0.270096,0.0441 0.523655,0.12678 0.25356,0.0827 0.463022,0.20395 l -0.154341,2.10564 q -0.308681,-0.11575 -0.63941,-0.15434 -0.325218,-0.0441 -0.639411,-0.0441 -0.440972,0 -0.826823,0.1378 -0.380339,0.13229 -0.666972,0.38585 -0.28112,0.25356 -0.446484,0.61736 -0.165365,0.36381 -0.165365,0.82132 0,0.28663 0.07717,0.55672 0.07717,0.26459 0.231511,0.47405 0.159852,0.20395 0.391363,0.33073 0.237023,0.12678 0.545704,0.12678 0.209462,0 0.429948,-0.0551 0.225998,-0.0551 0.385851,-0.18742 l 0.02205,-0.42995 -1.322918,-0.022 0.06615,-1.65365 q 0.821311,-0.0276 1.642623,-0.0441 0.821311,-0.0221 1.653647,-0.0551 z m 7.231952,-2.7671 q 0,0.5016 -0.115755,0.97014 -0.115755,0.46302 -0.336241,0.87092 -0.214975,0.4079 -0.529168,0.74965 -0.308681,0.33624 -0.700044,0.57878 -0.385851,0.24253 -0.84336,0.38034 -0.457509,0.13229 -0.97014,0.13229 -0.496094,0 -0.948091,-0.12678 -0.446485,-0.12678 -0.837848,-0.35278 -0.391363,-0.23151 -0.711069,-0.55122 -0.314193,-0.32521 -0.540191,-0.71658 -0.220487,-0.39687 -0.347266,-0.84887 -0.121268,-0.452 -0.121268,-0.94258 0,-0.47956 0.115756,-0.93706 0.115755,-0.46303 0.330729,-0.87093 0.220487,-0.4079 0.529167,-0.74965 0.308681,-0.34175 0.68902,-0.5898 0.385851,-0.24805 0.832336,-0.38585 0.446485,-0.1378 0.942579,-0.1378 0.799263,0 1.45521,0.24804 0.661459,0.24805 1.12448,0.71107 0.468534,0.45751 0.722093,1.11346 0.259071,0.65043 0.259071,1.45521 z m -2.447398,0.14331 q 0,-0.23702 -0.07166,-0.45751 -0.06615,-0.22599 -0.198438,-0.39687 -0.132291,-0.17639 -0.330729,-0.28112 -0.192926,-0.11025 -0.446485,-0.11025 -0.259071,0 -0.463021,0.0937 -0.20395,0.0937 -0.352778,0.25907 -0.143316,0.15986 -0.220487,0.38034 -0.07717,0.21498 -0.07717,0.45751 0,0.23151 0.06615,0.46302 0.06615,0.23151 0.198438,0.41893 0.132291,0.18741 0.325217,0.30317 0.198438,0.11575 0.457509,0.11575 0.259072,0 0.463021,-0.0992 0.209462,-0.10473 0.352779,-0.27561 0.143316,-0.17639 0.220486,-0.40238 0.07717,-0.226 0.07717,-0.46854 z"
id="text13"
aria-label="TANGO" />
<path
style="font-size:11.2889px;font-family:'Luckiest Guy';-inkscape-font-specification:'Luckiest Guy';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#f9f9f9;stroke:#000000;stroke-width:2.64583;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
d="m 68.416072,123.78768 q 0,0.32522 0,0.64492 0,0.31971 -0.03307,0.64492 -0.06063,0.68902 -0.297656,1.30638 -0.237023,0.61185 -0.644923,1.07488 -0.402387,0.46302 -0.981164,0.73311 -0.578777,0.2701 -1.32843,0.2701 -0.292145,0 -0.61185,-0.0496 -0.314193,-0.0496 -0.628386,-0.14883 -0.308681,-0.0992 -0.595313,-0.24253 -0.28112,-0.14883 -0.501606,-0.34176 l 0.341754,-2.28203 q 0.325217,0.31419 0.722092,0.51263 0.396876,0.19292 0.865409,0.19292 0.303169,0 0.512631,-0.0882 0.209462,-0.0882 0.347266,-0.24253 0.137804,-0.15435 0.214974,-0.3583 0.08268,-0.20946 0.115755,-0.44097 0.03858,-0.23702 0.0441,-0.48507 0.01102,-0.24804 0.01102,-0.49058 0,-0.87643 -0.08819,-1.74184 -0.08819,-0.87092 -0.15434,-1.74184 l 2.524568,-0.16537 q 0.165365,1.71979 0.165365,3.43959 z m 7.083124,-1.5875 q 0,0.4079 -0.03858,0.89848 -0.03858,0.49058 -0.12678,1.01424 -0.08819,0.52365 -0.23151,1.06384 -0.137804,0.53468 -0.347266,1.03078 -0.209462,0.49609 -0.490583,0.93155 -0.275607,0.42995 -0.63941,0.75517 -0.35829,0.3197 -0.804775,0.5016 -0.446485,0.18742 -0.992189,0.18742 -0.63941,0 -1.113456,-0.20947 -0.468533,-0.20395 -0.804775,-0.55121 -0.336241,-0.35278 -0.551216,-0.8158 -0.214974,-0.46853 -0.336241,-0.98668 -0.121268,-0.52365 -0.170877,-1.06384 -0.0441,-0.54571 -0.0441,-1.04731 0,-0.77171 0.07717,-1.5379 0.07717,-0.7717 0.220486,-1.53789 l 2.57969,0.0992 q -0.148828,0.86541 -0.259071,1.74184 -0.104731,0.87092 -0.104731,1.75287 0,0.0937 0.0055,0.28112 0.01102,0.1819 0.03307,0.41341 0.02205,0.226 0.06063,0.46853 0.0441,0.23703 0.115755,0.43546 0.07166,0.19844 0.170877,0.32522 0.104731,0.12678 0.242535,0.12678 0.159853,0 0.286632,-0.14883 0.12678,-0.15434 0.220486,-0.4079 0.09922,-0.25356 0.170877,-0.58429 0.07166,-0.33072 0.121268,-0.68902 0.04961,-0.35829 0.07717,-0.71658 0.03307,-0.35829 0.04961,-0.66697 0.02205,-0.30868 0.02756,-0.5457 0.0055,-0.23702 0.0055,-0.35278 0,-0.42995 -0.01654,-0.85438 -0.01102,-0.42995 -0.03859,-0.85439 h 2.57969 q 0.06615,0.76068 0.06615,1.54341 z m 5.28616,2.98759 -0.23151,2.44739 -4.641238,0.36381 q 0.03307,-1.92375 0.07166,-3.82544 0.0441,-1.9017 0.104731,-3.82544 h 2.866323 q -0.12678,1.20716 -0.242535,2.41433 -0.115756,1.20165 -0.165365,2.42535 0.259071,0.011 0.512631,0.011 0.253559,0 0.51263,0 0.308681,0 0.606338,-0.006 0.297656,-0.006 0.606337,-0.006 z m 3.235636,-4.61919 -0.606337,7.50756 -2.326131,0.12126 v -7.47448 z m 5.600354,-0.18742 q -0.03307,0.51815 -0.06063,1.02527 -0.02756,0.50711 -0.07166,1.02526 l -2.337155,0.12126 -0.05512,0.69454 H 88.7394 l -0.121267,1.70877 -1.653648,0.0551 -0.05512,0.80477 h 1.367015 0.97014 q -0.03307,0.60634 -0.07166,1.20717 -0.03307,0.59531 -0.06063,1.19613 l -4.751481,0.11025 0.17639,-7.94854 z m 6.013764,0.0662 -0.05512,2.33716 -1.642623,0.0661 -0.418924,5.22553 -2.326131,0.12126 0.01102,-5.22552 -1.642623,0.0882 0.06615,-2.60174 z"
id="text14"
aria-label="JULIET" />
<path
style="font-size:11.2889px;font-family:'Luckiest Guy';-inkscape-font-specification:'Luckiest Guy';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#f9f9f9;stroke:#000000;stroke-width:2.64583;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
d="m 113.02678,127.9659 -2.73403,0.35277 -0.33073,-1.24574 h -1.25677 l -0.27561,1.24574 -2.8112,-0.2756 2.19384,-7.3422 3.06476,-0.15434 z m -3.26319,-2.57969 -0.41893,-1.91824 -0.4079,1.91824 z m 8.22414,-0.0882 -0.23152,2.4474 -4.64123,0.3638 q 0.0331,-1.92374 0.0717,-3.82544 0.0441,-1.90169 0.10473,-3.82543 h 2.86632 q -0.12678,1.20716 -0.24254,2.41432 -0.11575,1.20165 -0.16536,2.42535 0.25907,0.011 0.51263,0.011 0.25356,0 0.51263,0 0.30868,0 0.60634,-0.006 0.29765,-0.006 0.60634,-0.006 z m 6.68073,-2.16076 q 0,0.53467 -0.15985,0.94809 -0.15985,0.41341 -0.44097,0.72209 -0.27561,0.30868 -0.65044,0.52365 -0.37483,0.21498 -0.80477,0.35278 -0.42444,0.13229 -0.88195,0.19844 -0.45751,0.0606 -0.89848,0.0661 v 2.56866 h -2.56867 q 0,-1.26228 0.006,-2.51354 0.006,-1.25126 0.0165,-2.52457 0.011,-0.67248 0.006,-1.34497 -0.006,-0.67248 0.0276,-1.35599 0.70556,-0.20946 1.41112,-0.31419 0.70555,-0.10473 1.45521,-0.10473 0.42443,0 0.84887,0.0717 0.42444,0.0661 0.81029,0.21497 0.39136,0.14883 0.72209,0.37483 0.33624,0.22048 0.57878,0.52916 0.24253,0.30868 0.38033,0.70556 0.14332,0.39136 0.14332,0.88195 z m -2.4474,0.18741 q 0,-0.35829 -0.22048,-0.55673 -0.21498,-0.20395 -0.56224,-0.20395 -0.11576,0 -0.24254,0.022 -0.12127,0.0165 -0.23151,0.0441 l -0.0662,1.60955 q 0.0772,0.011 0.14883,0.011 0.0717,0 0.14883,0 0.19844,0 0.38034,-0.0661 0.18741,-0.0662 0.33073,-0.18742 0.14332,-0.12678 0.226,-0.29214 0.0882,-0.17088 0.0882,-0.38034 z m 9.2935,5.11528 -2.75608,0.13229 -0.022,-2.54661 h -1.26779 l -0.0772,2.41432 h -2.46945 l 0.20946,-7.75009 2.62379,0.12126 -0.16536,3.95773 h 1.22369 l 0.011,-4.25538 2.51354,0.0661 z m 7.47449,-0.47404 -2.73403,0.35277 -0.33073,-1.24574 h -1.25677 l -0.27561,1.24574 -2.8112,-0.2756 2.19384,-7.3422 3.06476,-0.15434 z m -3.2632,-2.57969 -0.41892,-1.91824 -0.4079,1.91824 z"
id="text15"
aria-label="ALPHA" />
<path
style="font-size:11.2889px;font-family:'Luckiest Guy';-inkscape-font-specification:'Luckiest Guy';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#f9f9f9;stroke:#000000;stroke-width:2.64583;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
d="m 149.98623,125.57913 q 0,0.75516 -0.26459,1.32292 -0.25907,0.56224 -0.71658,0.93706 -0.452,0.37483 -1.06385,0.56224 -0.60633,0.18742 -1.30638,0.18742 -0.27009,0 -0.59531,-0.0717 -0.31971,-0.0717 -0.65043,-0.17639 -0.33073,-0.11024 -0.63942,-0.23151 -0.30316,-0.12678 -0.54019,-0.23702 l 0.24254,-2.27101 q 0.46853,0.28112 1.03628,0.42995 0.57327,0.14331 1.12448,0.14331 0.10474,0 0.25356,-0.006 0.14883,-0.011 0.28112,-0.0496 0.13781,-0.0441 0.23151,-0.12678 0.0937,-0.0827 0.0937,-0.23702 0,-0.10473 -0.0661,-0.17639 -0.0661,-0.0772 -0.17088,-0.12127 -0.10473,-0.0496 -0.23702,-0.0717 -0.1323,-0.0276 -0.25908,-0.0386 -0.12678,-0.011 -0.23702,-0.011 -0.11024,0 -0.17639,0 -0.47404,0 -0.86541,-0.16536 -0.38585,-0.16537 -0.66697,-0.45751 -0.27561,-0.29766 -0.42995,-0.70004 -0.15434,-0.4079 -0.15434,-0.88195 0,-0.65043 0.25907,-1.16307 0.26459,-0.51814 0.70005,-0.87643 0.44097,-0.3638 1.00872,-0.55673 0.56776,-0.19292 1.17409,-0.19292 0.2701,0 0.55673,0.0221 0.28663,0.0165 0.56775,0.0661 0.28664,0.0496 0.55673,0.12678 0.2701,0.0772 0.51263,0.19293 l -0.20946,2.23793 q -0.37483,-0.12678 -0.78824,-0.20946 -0.4079,-0.0882 -0.79926,-0.0882 -0.0717,0 -0.18741,0.006 -0.11025,0 -0.23703,0.0165 -0.12126,0.011 -0.24804,0.0386 -0.12678,0.0276 -0.226,0.0772 -0.0992,0.0441 -0.15986,0.12127 -0.0606,0.0772 -0.0551,0.1819 0.006,0.12127 0.0882,0.19844 0.0882,0.0717 0.22048,0.11575 0.13781,0.0386 0.29766,0.0551 0.16537,0.0165 0.32522,0.022 0.15985,0 0.29765,0 0.13781,-0.006 0.226,0.006 0.44098,0.0276 0.79375,0.18741 0.35278,0.15985 0.59532,0.42444 0.24804,0.26458 0.37482,0.63389 0.1323,0.36381 0.1323,0.80478 z m 3.32383,-4.82865 -0.60634,7.50756 -2.32613,0.12126 v -7.47448 z m 5.60035,-0.18742 q -0.0331,0.51815 -0.0606,1.02527 -0.0276,0.50711 -0.0717,1.02526 l -2.33716,0.12126 -0.0551,0.69454 h 1.64263 l -0.12127,1.70877 -1.65365,0.0551 -0.0551,0.80477 h 1.36701 0.97014 q -0.0331,0.60634 -0.0717,1.20717 -0.0331,0.59531 -0.0606,1.19613 l -4.75148,0.11025 0.17639,-7.94854 z m 6.64766,2.63482 q 0,0.42994 -0.0772,0.78272 -0.0717,0.34727 -0.23151,0.63941 -0.15985,0.29215 -0.41341,0.54019 -0.25356,0.24805 -0.61185,0.47405 l 1.31189,2.33716 -2.48047,0.48507 -0.84887,-2.34818 -0.68351,0.022 -0.0992,2.29306 h -2.37022 q 0.0276,-1.25677 0.0496,-2.50252 0.0276,-1.24575 0.0606,-2.50252 0.011,-0.6339 0.0221,-1.25677 0.011,-0.62287 0.0441,-1.25677 0.38585,-0.14332 0.76067,-0.23702 0.37483,-0.0937 0.74966,-0.14332 0.38034,-0.0551 0.76619,-0.0717 0.39136,-0.0221 0.79926,-0.0221 0.62839,0 1.21267,0.17639 0.58981,0.17088 1.0418,0.51814 0.452,0.34727 0.72209,0.86541 0.27561,0.51815 0.27561,1.20717 z m -2.46944,0.17639 q 0,-0.23152 -0.0661,-0.42444 -0.0606,-0.19293 -0.18741,-0.33073 -0.12127,-0.14332 -0.30868,-0.22049 -0.18191,-0.0827 -0.42995,-0.0827 -0.11025,0 -0.21498,0.0165 -0.10473,0.011 -0.20395,0.0386 l -0.0882,2.05053 h 0.13229 q 0.23702,0 0.47956,-0.0606 0.24805,-0.0606 0.44097,-0.18741 0.19844,-0.12678 0.31971,-0.32522 0.12678,-0.19844 0.12678,-0.47404 z m 9.31003,-0.17639 q 0,0.42994 -0.0772,0.78272 -0.0717,0.34727 -0.23151,0.63941 -0.15985,0.29215 -0.41341,0.54019 -0.25356,0.24805 -0.61185,0.47405 l 1.31189,2.33716 -2.48047,0.48507 -0.84887,-2.34818 -0.68351,0.022 -0.0992,2.29306 h -2.37022 q 0.0276,-1.25677 0.0496,-2.50252 0.0276,-1.24575 0.0606,-2.50252 0.011,-0.6339 0.0221,-1.25677 0.011,-0.62287 0.0441,-1.25677 0.38586,-0.14332 0.76068,-0.23702 0.37483,-0.0937 0.74966,-0.14332 0.38033,-0.0551 0.76619,-0.0717 0.39136,-0.0221 0.79926,-0.0221 0.62838,0 1.21267,0.17639 0.5898,0.17088 1.0418,0.51814 0.452,0.34727 0.72209,0.86541 0.27561,0.51815 0.27561,1.20717 z m -2.46944,0.17639 q 0,-0.23152 -0.0661,-0.42444 -0.0606,-0.19293 -0.18741,-0.33073 -0.12127,-0.14332 -0.30868,-0.22049 -0.18191,-0.0827 -0.42995,-0.0827 -0.11025,0 -0.21498,0.0165 -0.10473,0.011 -0.20395,0.0386 l -0.0882,2.05053 h 0.13229 q 0.23702,0 0.47956,-0.0606 0.24805,-0.0606 0.44097,-0.18741 0.19844,-0.12678 0.31971,-0.32522 0.12678,-0.19844 0.12678,-0.47404 z m 9.80061,4.66328 -2.73403,0.35278 -0.33073,-1.24575 h -1.25677 l -0.27561,1.24575 -2.8112,-0.27561 2.19384,-7.34219 3.06476,-0.15434 z m -3.2632,-2.57969 -0.41892,-1.91823 -0.4079,1.91823 z"
id="text16"
aria-label="SIERRA" />
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -12,9 +12,9 @@
`--' `-----' `--' `--' `-----' `--' `-----' `--' `--' `-----'
{{ location | upper }}
TIETOJÄRJESTELMÄASENTAJIEN INTRA TIETOJÄRJESTELMÄASENTAJIEN INTRA
{{ hostname | upper }} {{ hostname | upper }}
{{ location | upper }}
Made by Made by
Jääkäri Warén Jääkäri Warén

View File

@@ -1,7 +1,7 @@
{ {
"Dhcp4": { "Dhcp4": {
"interfaces-config": { "interfaces-config": {
"interfaces": [ "{{ ansible_facts.interfaces | select('search', '^enp') | first }}.20" ] "interfaces": [ "enp0s25.20" ]
}, },
"control-socket": { "control-socket": {
"socket-type": "unix", "socket-type": "unix",
@@ -69,7 +69,7 @@
{ {
"id": 2, "id": 2,
"subnet": "192.168.2.0/27", "subnet": "192.168.2.0/27",
"interface": "{{ ansible_facts.interfaces | select('search', '^enp') | first }}.20", "interface": "enp0s25.20",
"pools": [ "pools": [
{ {
"pool": "192.168.2.1 - 192.168.2.30" "pool": "192.168.2.1 - 192.168.2.30"
@@ -161,7 +161,7 @@
{ {
"id": 69, "id": 69,
"subnet": "192.168.69.0/26", "subnet": "192.168.69.0/26",
"interface": "{{ ansible_facts.interfaces | select('search', '^enp') | first }}.69", "interface": "enp0s25.69",
"pools": [ "pools": [
{ {
"pool": "192.168.69.1 - 192.168.69.62" "pool": "192.168.69.1 - 192.168.69.62"

View File

@@ -13,7 +13,6 @@ body {
#kc-header-wrapper { #kc-header-wrapper {
font-family: "Luckiest Guy", sans-serif; font-family: "Luckiest Guy", sans-serif;
text-transform: uppercase;
} }
div.kc-logo-text.kc-logo-custom { div.kc-logo-text.kc-logo-custom {

View File

@@ -11,7 +11,6 @@ body {
color: #ffffff; color: #ffffff;
text-decoration: none; text-decoration: none;
font-family: "Luckiest Guy", sans-serif; font-family: "Luckiest Guy", sans-serif;
text-transform: uppercase;
} }
@font-face { @font-face {
@@ -30,7 +29,7 @@ p, main a {
} }
h1 { h1 {
font-size: 12em; font-size: 3em;
margin-bottom: 0; margin-bottom: 0;
background-image: url(../img/logo.svg); background-image: url(../img/logo.svg);
background-repeat: no-repeat; background-repeat: no-repeat;

View File

@@ -15,9 +15,9 @@
|_| |_|
{{ location | upper }}
TIETOJÄRJESTELMÄASENTAJIEN INTRA TIETOJÄRJESTELMÄASENTAJIEN INTRA
{{ hostname | upper }} {{ hostname | upper }}
{{ location | upper }}
Palvelimen hallinta on automatisoitu. Manuaaliset muutokset saatetaan Palvelimen hallinta on automatisoitu. Manuaaliset muutokset saatetaan
ylikirjoittaa automatisoidusti. ylikirjoittaa automatisoidusti.

View File

@@ -8,16 +8,16 @@ auto lo
iface lo inet loopback iface lo inet loopback
# The primary network interface # The primary network interface
allow-hotplug {{ ansible_facts.interfaces | select('search', '^enp') | first }} allow-hotplug enp0s25
iface {{ ansible_facts.interfaces | select('search', '^enp') | first }} inet dhcp iface enp0s25 inet dhcp
auto {{ ansible_facts.interfaces | select('search', '^enp') | first }}.20 auto enp0s25.20
iface {{ ansible_facts.interfaces | select('search', '^enp') | first }}.20 inet static iface enp0s25.20 inet static
address 192.168.2.10/27 address 192.168.2.10/27
gateway 192.168.2.1 gateway 192.168.2.1
hwaddress 90:1b:0e:5b:18:fb hwaddress 90:1b:0e:5b:18:fb
auto {{ ansible_facts.interfaces | select('search', '^enp') | first }}.69 auto enp0s25.69
iface {{ ansible_facts.interfaces | select('search', '^enp') | first }}.69 inet static iface enp0s25.69 inet static
address 192.168.69.20/26 address 192.168.69.20/26
hwaddress 90:1b:0e:5b:18:fc hwaddress 90:1b:0e:5b:18:fc

View File

@@ -1 +0,0 @@
Listen 8090

View File

@@ -1,29 +0,0 @@
<VirtualHost *:8090>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>

View File

@@ -72,7 +72,7 @@ server {
gunzip on; gunzip on;
location / { location / {
proxy_pass http://127.0.0.1:8080; proxy_pass http://127.0.0.1:3001;
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_intercept_errors on; proxy_intercept_errors on;
proxy_http_version 1.1; proxy_http_version 1.1;
@@ -115,7 +115,7 @@ server {
gunzip on; gunzip on;
location / { location / {
proxy_pass http://127.0.0.1:8090; proxy_pass http://127.0.0.1:3001;
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_intercept_errors on; proxy_intercept_errors on;
proxy_http_version 1.1; proxy_http_version 1.1;

View File

@@ -16,8 +16,8 @@
<!-- Link: Preconnect & DNS Prefetch & Preload --> <!-- Link: Preconnect & DNS Prefetch & Preload -->
<link rel="preconnect" href="//cdn.waren.io"> <link rel="preconnect" href="//cdn.waren.io">
<link rel="dns-prefetch" href="//cdn.waren.io"> <link rel="dns-prefetch" href="//cdn.waren.io">
<link rel="preload" as="style" href="https://cdn.waren.io/frameworks/font-awesome/7.1.0/css/all.min.css" crossorigin="anonymous"> <link rel="preload" as="style" href="https://cdn.waren.io/frameworks/font-awesome/7.0.0/css/all.min.css" crossorigin="anonymous">
<link rel="preload" as="font" type="font/woff2" href="https://cdn.waren.io/frameworks/font-awesome/7.1.0/webfonts/fa-solid-900.woff2" crossorigin="anonymous"> <link rel="preload" as="font" type="font/woff2" href="https://cdn.waren.io/frameworks/font-awesome/7.0.0/webfonts/fa-solid-900.woff2" crossorigin="anonymous">
<style> <style>
body { body {
@@ -67,7 +67,7 @@
</style> </style>
<!-- Link: CSS --> <!-- Link: CSS -->
<link rel="stylesheet" href="https://cdn.waren.io/frameworks/font-awesome/7.1.0/css/all.min.css" crossorigin="anonymous" media="screen"> <link rel="stylesheet" href="https://cdn.waren.io/frameworks/font-awesome/7.0.0/css/all.min.css" crossorigin="anonymous" media="screen">
</head> </head>
<body> <body>
<header> <header>

View File

@@ -1,2 +0,0 @@
nameserver 127.0.0.1
nameserver 1.1.1.1

View File

@@ -1 +1,2 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQClWZxHhmgV2LD3mrbLU2VxPXGMx02WaB5MU9t8XJsqAmsIKwUZSqHTrlR20dXPGlZhe5Rx4vf+ZKx0kuNKJMvswEkvpP0la9WSsawWHxhOTrqDr0yZMV1/CncdARw1vse3zJCQVbOflbKYsKgpdJHbMzk5SfSZijSscrgxRTa8qX/ndnmlGrgm4MxezgFBEJrzC4vCTZLK5LPkAva+2A6fwElgR7V1Dkg5p5l0/nvKbBje+ugaiTw7RPy42oC/hHrsvsnTQ4KheD1phRJFCSEnj6l7gxVetVBznZ/K697MrK4aNUFLDV29uiPALj+1fWAYTIO3WPNU/QkH7OEP8JO3 argo.aito.tjas ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQClWZxHhmgV2LD3mrbLU2VxPXGMx02WaB5MU9t8XJsqAmsIKwUZSqHTrlR20dXPGlZhe5Rx4vf+ZKx0kuNKJMvswEkvpP0la9WSsawWHxhOTrqDr0yZMV1/CncdARw1vse3zJCQVbOflbKYsKgpdJHbMzk5SfSZijSscrgxRTa8qX/ndnmlGrgm4MxezgFBEJrzC4vCTZLK5LPkAva+2A6fwElgR7V1Dkg5p5l0/nvKbBje+ugaiTw7RPy42oC/hHrsvsnTQ4KheD1phRJFCSEnj6l7gxVetVBznZ/K697MrK4aNUFLDV29uiPALj+1fWAYTIO3WPNU/QkH7OEP8JO3 argo.aito.tjas
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPW5phGhwAG8dmT+sR0uF1gRc0X9xXZiiFxvKUEsPk1N cwchristerw

File diff suppressed because one or more lines are too long

26
init.sh
View File

@@ -38,39 +38,39 @@ exit 1
} }
ti-header "Haetaan pakettien tiedot..." ti-header "Haetaan pakettien tiedot..."
apt update sudo apt update
echo -e "\n\n" echo -e "\n\n"
ti-header "Asennetaan Ansiblen järjestelmäpaketti riippuvuudet..." ti-header "Asennetaan Ansiblen järjestelmäpaketti riippuvuudet..."
apt-get install -y python3-pip python3-venv jq git curl lsb-release sudo apt-get install -y python3-pip python3-venv jq git curl lsb-release
echo -e "\n\n" echo -e "\n\n"
ti-header "Luodaan Ansiblelle virtuaalinen ympäristö..." ti-header "Luodaan Ansiblelle virtuaalinen ympäristö..."
python3 -m venv /opt/ansible python3 -m venv $HOME/.venv/ansible
echo -e "\n\n" echo -e "\n\n"
ti-header "Asennetaan Ansiblen Python-kirjasto riippuvuudet..." ti-header "Asennetaan Ansiblen Python-kirjasto riippuvuudet..."
/opt/ansible/bin/pip3 install cryptography dnspython hvac jmespath netaddr pexpect $HOME/.venv/ansible/bin/pip3 install cryptography dnspython hvac jmespath netaddr pexpect
echo -e "\n\n" echo -e "\n\n"
ti-header "Asennetaan Ansible..." ti-header "Asennetaan Ansible..."
/opt/ansible/bin/pip3 install ansible $HOME/.venv/ansible/bin/pip3 install ansible
echo -e "\n\n" echo -e "\n\n"
ti-header "Asennetaan Ansible kokoelmat..." ti-header "Asennetaan Ansible kokoelmat..."
/opt/ansible/bin/ansible-galaxy collection install ansible.posix containers.podman --upgrade $HOME/.venv/ansible/bin/ansible-galaxy collection install ansible.posix containers.podman --upgrade
echo -e "\n\n" echo -e "\n\n"
mkdir -p $HOME/.ssh/keys &> /dev/null mkdir -p $HOME/.ssh/keys/pvjjk-1vos-niinisalo &> /dev/null
if [[ ! -f $HOME/.ssh/keys/infra ]] if [[ ! -f $HOME/.ssh/keys/pvjjk-1vos-niinisalo/infra ]]
then then
ti-header "Generoidaan SSH-avain Infra-repon käyttöön..." ti-header "Generoidaan SSH-avain Infra-repon käyttöön..."
ssh-keygen -f $HOME/.ssh/keys/infra -t ed25519 -N '' -C $(hostname --fqdn) ssh-keygen -f $HOME/.ssh/keys/pvjjk-1vos-niinisalo/infra -t ed25519 -N '' -C $(hostname --fqdn)
echo -e "\n\n" echo -e "\n\n"
fi fi
ti-header "Lisää SSH-avain Infra-repon käyttöön..." ti-header "Lisää SSH-avain Infra-repon käyttöön..."
cat $HOME/.ssh/keys/infra.pub cat $HOME/.ssh/keys/pvjjk-1vos-niinisalo/infra.pub
echo -n "Onko avain lisätty Github-repoon? [K/E]" echo -n "Onko avain lisätty Github-repoon? [K/E]"
while [[ -z $SSHKEY_QUESTION || ! -z $SSHKEY_QUESTION && $SSHKEY_QUESTION != "K" ]] while [[ -z $SSHKEY_QUESTION || ! -z $SSHKEY_QUESTION && $SSHKEY_QUESTION != "K" ]]
@@ -80,7 +80,7 @@ done
echo -e "\n\n" echo -e "\n\n"
mkdir -p $HOME/.ansible/vault &> /dev/null mkdir -p $HOME/.ansible/vault &> /dev/null
if [[ ! -f $HOME/.ansible/vault/infra ]] if [[ ! -f $HOME/.ansible/vault/pvjjk-1vos-niinisalo ]]
then then
ti-header "Syötä Ansible Vaultin salasana..." ti-header "Syötä Ansible Vaultin salasana..."
echo -n "Salasana: " echo -n "Salasana: "
@@ -90,14 +90,14 @@ then
if [[ ! -z $VAULT_PASSWORD ]] if [[ ! -z $VAULT_PASSWORD ]]
then then
echo "$VAULT_PASSWORD" > $HOME/.ansible/vault/infra echo "$VAULT_PASSWORD" > $HOME/.ansible/vault/pvjjk-1vos-niinisalo
fi fi
done done
echo -e "\n\n" echo -e "\n\n"
fi fi
ti-header "Suoritetaan Infran asennus..." ti-header "Suoritetaan Infran asennus..."
/opt/ansible/bin/ansible-pull -U ssh://git@github.com/cwchristerw/tjas-infra -d $HOME/.ansible/pull/infra --accept-host-key --private-key $HOME/.ssh/keys/infra --vault-password-file $HOME/.ansible/vault/infra tasks.yml -t installer $HOME/.venv/ansible/bin/ansible-pull -U ssh://git@github.com/cwchristerw/tjas-infra -d $HOME/.ansible/pull/pvjjk-1vos-niinisalo/infra --accept-host-key --private-key $HOME/.ssh/keys/pvjjk-1vos-niinisalo/infra --vault-password-file $HOME/.ansible/vault/pvjjk-1vos-niinisalo tasks.yml -t installer
echo -e "\n\n" echo -e "\n\n"
echo " echo "

View File

@@ -1,6 +0,0 @@
$ANSIBLE_VAULT;1.2;AES256;infra
33386430326363383437666438386537326335363734643930613236613831626230643064356334
3135626438653437383961306332336232656231313435390a346433363530366262653830363231
65313965383261326366633238613662316663333735616136316332326534376331316364633633
6531653864313533350a306437396165373635313063306636663761303762623633346536666437
3961

View File

@@ -1,151 +0,0 @@
$ANSIBLE_VAULT;1.2;AES256;infra
66646230653763333733613633343366663932356161303735316330396335626533613935623464
3731306166663664633633343864666464376466353638620a313738393261326239383363366264
66386264666265653937646439646531643431613665393830343939333339376636633265376261
6563393338386236390a346233613363373337313335373139323433356161353231346336306632
38393932323338343461373834626163356565353765366437636137376136356230366335616438
38346437306161303331366537356630623566666566393364383161306663663837653430326232
35313064313531316263333034316266383561666539313936363539646435646463346233616565
34613962623633356232343838653435656365656563373637653131653336646139343862613831
33623061656439383833346334396461643661626366326263386238396330646563333535643432
35353335653463306237633961363431333734333638613462306365616635646130623239373732
30323832313562356131663539343239643633323666363461356434373634633938313639626261
34346561363962386666366565373435303130326534353039613831666366393863333439303331
66363132326230626632306635363937656236626262646333623534323037356233333136643664
30316363623835356334633230303961393230626161316661396166386638653836323330333933
31323039643039353062636437646262663662633430636563613461313962343163663239366233
62643665333363326239633064323033386136303831336230663831343633356535383330316262
64353661396563373036653165383462626432653636316337373337373364636530323339313266
61363238613966646464303934393161623463356132386562663066363564343363653734636565
35616137376363373031346461633931336164323638663137303230373233366132613739386238
36616134376263663561306461653637363835353930636165613439373265386462623736656161
30333066383930633139616333613965636162316634613739633463616163653132623033666563
61656466636130323937393334653464666636613631656239656263636339306563396162366637
32613036323631643038653561383733663561363162656435626461356532323331636332316665
63393637306661663231623061323138356166323534663630663239653034316538623763633435
64633162623831636263613939643939356634306636616263323139333430663038336335663232
37636537393835333737393365303530646666386133393732626235346133653138313432663734
37386634633763356130343732363134393430656133373939623834646362343431663964373262
33326361393433663266643636663935313066326561643765353061623832626166323337313835
61303235626639346162373566343639643030333436323064376365343733623866646465636233
33343930376534623663346136643739353963326163336538336530313061333432383664396432
31393936643762353965653962666330323062633166346462646335316534656634383762323265
66346436393836633064646139346433373436613533333133333736396531646564363135346436
65613430353133313663386166386163643835373730353531343135396339346162336562623032
64613033616466626437353036653530633037653332313962623466303436353039616133393261
31633537343430316365366161386237353930633861626161303461626636373037336331356139
61326532646230383535613538323735356639643834393837646638313965356262356532313562
35333534613033653633303731353231363931346335363561346131353964633531326364303663
30633336306334666535633030306334656130336161633637636163383066383330336664326561
36383963656430303739303463366639643466636132323433323439383037323565636262346363
39623637306233353836636639323639333832303563303364653763656235663963326466623630
32373363313164663130666138333361343838316130623835623631373533386437663034376562
32383533333832653361363333356266376666613661653632373562326561313837666263613464
66646432633564313639656666306337313135666538396166396266633137383264313664613063
34326563613335626564656336383434613133626232333733393233306365333039393138663235
61396564343830386636643366393332636338366562333061626334636335626364633938613932
33333139356537373966306565376366343765663434343936633930653033353564633165393065
35646434643566333035303730373761616130653530636137353333323139663363636135343666
34386662303136336239646263313366393762393664303030623934663861326237346536376239
61643530636138626631626664343033363734366466386530666435336632363534616363333561
62373936356637313334623064393865343264363932663839653936643365633161623764386562
65363737653737333738646262336365386534653636336434636639366139616163386333393463
32613566353564376334653735343034663630376364393532313233363837386639303666343136
65623561316335303166643630383363633438373634653731633764346166323061333237363237
35356564353339323636373435393661303633333338343063663335333163666430613137343565
39373537636137383931376639666236343039353362623861633639313931323862376463626239
39643239653030383737633132386436356631626263396166393834663936616563366661633666
38363633616461623133636438333833363562653863323363373136313566393738333961396131
61626564306537383434333931633839323663346565623765636636336266336366323137303232
66323537353631636262373930386538623964393731653265383462666664356330663238346334
30613539316163383165363732643665316462326534316138363963363563373631326633653766
63343137393136663166373035333130366361666364373732316161383065646238326233383665
38323133313863656431376238303830653935353762386537353539333534373337323230616131
61323739393663643562363066373663393135663238353765633264666537626639343939616463
63636339396366313835636466666536346465643536366434653534396465626261656263333361
65326435383165343964623363646536356366336335663262386362393432653063363736623861
65353036316630646163323439383438303638626562376134633363643830656561333163303466
39363561306263396562646464623030623431393764393933393663343361633162353136626534
35613465313063323531653365373361633866636161616366386230396232653863336663313064
36633233656638643035316539366364613336303138643461653133323662666337323933643838
30306335616132313634646332346565383638663062643439653461303062373439313631663738
36353538643430663463396365636136383731646363633065623532396333326166643436373839
63613735646230633635353130613130303362306661376361343632373661616364323037303435
37636632313733343236323535663136633434653164373962303865373565616131316434646164
33303865393864633439623366616335666439393261353634613532306331323261356662623031
34333939626633623963383939373464303763316532393037363338393839653238663635656165
32303132653235303762326532343436643763636232386162663834333635663761396532643165
38326262653565626363366463663233396464356166393661366432383037663034346366653038
34656633373933386661343030646362323032343736616461656166626432313633626239346132
32366661643761376639393438303665633266653233303433346461313538343333393962613632
39666231386535393366333965646363336636376565383732373133386462623763386666343938
37363962346238386161356238626538646533333739633938643065313435396336323534616137
30363665343832326136633662623966346235383739666431393161383238313933656464396264
33343731363734386530663731623864663139343730343063613038323564343461366438366165
32343330656436373033393538613334373462303434336562373263653838383138343564393639
66306538616333616138326666373965616563323739663363303036626439633761316538663132
62636633383936663436636637633863633561646339396463643031653338383465333336386166
64303435353661383663303466633732373236656134623965623237623737626363656232346336
36376663316630386265316135653334623564623939663138383266396537313532663839393366
31623033346564623633343166646330386536333937626630343338396235663166623164386335
63666437363439333866306131343831616434613033636431646263323039663761663830656431
33633537643130373662386439656564386136383539386564646438353130363130313836316631
31363365316138393734373666313631393331636136386364303131386231623838333863313337
30343832336561336234616537646630633937646530666664623531366664343866643765326265
34653764646237636563306134613762333235313362396662346261623035313331313435663536
63643031353230653462333064383636383464393438396365633964656334376638366164343437
34373766636665346361363064663962363161393464656566393630373831386235613837396138
63656336623466643663656264353666363038353661653732393537653731646362393439653962
36356663613638636139636530376363333132656135333531323735366338633730663366366335
37653063626537373066653733326638336234393136323036313763666134333661636230393139
34623038656435393466363836623566663732623135306437396435336636633166313337633761
38346534643339616265333463373264383139323565353933623666353535353862633463373962
36356432623431346235653231383664623466306635663939646362366663313362316561343239
32663766356161353163666136663061653866656562383931336337316663396534616261336466
31396130336638663232663031326461303939376463636633393830393566343630303934363365
36313631643066393536346261336133303135333032333837303735303231306631336135303462
66623962393936366665623330373133663630633730353336373165393138616565303432663066
39633134643137326165353861336265316435663534616638663733353037633239643635363434
63376538663163333336313433643133616262663036363164636334303336333563623339316237
66643036366337303066356131643964663861626266333764663763313133373463343465633238
39313930386662373638383831303264333537343064303365396166653135303235323861666638
33343036303733666536633534663166343437656664303439373330643062663263343032653939
64346365633934663536646562366133643665373636356137623161326433356336663836323436
65636432366531373063383138386235373761393661613737346237303937303433353036393533
34613233623964643961623335613934343665323062613963616435663833346465623061353161
39643064303332643536656166313139623933653466353063356134653538366161636661663733
38303536326333316366333339306538336334356365656661363861623130346337323063303138
36376634386534313432326435633732303562326366636135653234333366643730353763313931
30323365613436343733616330623734316262663165336537306635653966663764626463643764
31393635323332363265666237363365326434353764306162303937613231386262613665333838
33646133373663626161356566633333326165313461623131343539396430373463366539366634
31643238666438306434383934363065643031613861393830663532643361613363353230356666
65326666386264613135613664623834656234376431346665313235393463356536366132356239
36613562376265346234623434643635333761376335363161353934333137616230383630323363
36643433656139316364633566616161363036343537643037343632306331343864656239343536
34343839326638663365383362656262366361313830653735336633623232616233633733656465
65633333343261356563356434393361303162666335336335363361663362353466393233636638
31316162303631306465383865353262336633393637613534313238623436623165643439353865
36633364383839626134326661663037313336613835646232323236393838386438613134383432
64663166616438623663633438343663646161633137353438393839366466663862623739613536
66383232373434666263333136346434303637303164306563393739313038343031376630316138
34303636363837353031363134633563366633373636363830663530623862656365336238623232
37613063656531666631303566393461656266303839656266646563373135383930393231333065
32396339636533306335633965633264633634613233336165623062363965643135363133376430
30653063653736326164613833313036343236343838313036313035333361356132373439623865
61616662383139663466353264373835313934623765623237323030613036346161646461613732
36376236383463356565353830323335623238376533336636383539336539643134663234323930
63373431326138396566313034613536643737633465663632623136376138663937383961653536
38396339393434626436383530366130323864373131343038636337373437343263353561646132
35613866366639666361396530303266383233646638333232366261653837643766363939383437
38363732333166616331386562383933633964386433613136353034656231306237633238323261
64383037333837323037646464343063326361333061613634663739363634653137363362636531
33633033393665306464373238376535386435313831613861373130343661336638376237306366
32343438366666646239343133333562333037626363316163626438663534633366383961626431
61336534396163343062316330626431626433313563393638343365306639383861343437353132
64376433333764656662323265343861643266366130623365353032373861363238643662616666
32376534313364376461393132306633383266326534633034653331396466343537373931316235
33646563356661393639663934333465343361303361393166356664306264353063313635343465
30626435333565636637353539306264393166343936363066373861396134653435626262353139
63363831363837633962303264393461333736363639313031323564333335343838393039313461
3234353366373830613739383537393336353061306534336566

View File

@@ -1,18 +0,0 @@
$ANSIBLE_VAULT;1.2;AES256;infra
39633132376130303332653737373230626537373837343436343262663632626635633634653232
3032316237633864646435336637353135383637653565640a323432326439303363643533636361
35343364663632663366306465353138663036313131633366613463643337633233323436363836
3564313436633339320a346637343865303138306562613965373762316331623933633434616538
36393165643062303336323639326535613936363131383566633061323564393337366331366539
38333037653139336361313931353861396361616364333230343663366361346634613765346233
30326465353139643133626364306263383033336463333639393338613936343862636339663231
63616361363861386164373135313265343338313038333962656535383139313830373939303730
35373936613161366163316132336132356238313735663834356366373233633938386136656630
38383361316565306164376264363239666663363134613336656366613863636335376431656239
34336235653166373265633438386138336238373761366163326664616537643639663434363036
34643335663835383336316664323963386464643061636461643732333534356161633234313361
37396161333065333636336133616131333735366535663864646633643231396337356462353835
30383831356236616564663739653031303638363937313965663365663464313138396231623134
30353735363463623132323965333730303030393631633638386561396630316439653466626339
61363165656561663236343463613066336235666631343365303663333535616337666637323166
3965

View File

@@ -0,0 +1,7 @@
$ANSIBLE_VAULT;1.2;AES256;pvjjk-1vos-niinisalo
32346637346466313730396432643465623238663933663433353533313965623665633465313234
3131396635386430636465653863363732613030656135330a656161383235393331646262323730
35383338396430636161613061356631636663373930383665373639333636383765623564376362
6439613833633931380a336635313230386361663961306431386435343833623632613537643832
30393234363137363037663263626236333932313530316362343133383961383262656434373339
3534306364623230383164326664313937313231633030623935

View File

@@ -0,0 +1,6 @@
$ANSIBLE_VAULT;1.2;AES256;pvjjk-1vos-niinisalo
35336436646238616364326137333533373763366436663439363731626264343936626536633031
6562643636343530313964633333613062353735653764630a613633396239353037383233376432
61333239653263366662346239643461346238376433323231386439653261303735393332336261
6531336564386238390a313363313964666161613130383366636132336165333030376636303437
6130

View File

@@ -0,0 +1,144 @@
$ANSIBLE_VAULT;1.2;AES256;pvjjk-1vos-niinisalo
38343231366236396666383238643863656636663030313937636337663133663063303962666132
3664383032373334396261393039613032326664313065320a636330323363383561393364653239
64346563343835613638613037646237313032303366653536626362663462666436663866353237
6130356134633966350a333532343864653937616434306432643535373337363536343839363566
62386430396566343131303761613538633030386164323230313563313836333032303836656232
38333535646461616132306266366134653530346161646261386539636662613535613262326338
62326432343632343235393330396138373237303662346231363938383064656131333737343039
65643136393531383434363532343735656163653364643264356532346566633835646363343337
39616133343132343933653731346135373362643565656139343534653937393732653034613137
37306233633533616230313333653235363762346138373534343539346266656561346566366637
30636539383061623939383134326532653330633234316234636638633633323633663064383566
34363234386633393535363961343665663632316434356266633038353737383439343965653564
65613335316237646638636165303165363030643534666361363364363762633963336432633035
32636132313461306565656636393465633036303735316430383832356131373531613763393634
32646430666265663238626233633762336637356538666464333035633636633033356435366335
39386536363631653232643132386537376337333864656365333433663565653330613935646331
37313732393935646630363664303933356264393366663335386366613830666630363736333533
38353062373730383830666331623265353235333334336262363339333636393937646165336238
32653737336537326132306164366364346563623431306438363033326634373462366461396533
35643363626265323038363736363164633733343064643438373934663065616265333965376533
61366230323665323136363561626136663830656238643834313832303333396332353365663263
38663033643534613335336538666566326534313362313130346166363465333630313735366231
63333235633034303131643634346633646433303062613163643234356165363431336535303264
61633334386538663963616163376236636436663238346432646433643265633132613536316262
39313831626135623665306131646533353066313535346439643661366263386636353537663064
63323763326266323836313763363064623362636261313930633436303265633433623431643661
33323334626236643135613562613636313461336239343338333437396165636362633532326364
35363030323839396435663436333063363064656662613136616563306136666239376232336435
65373935356464653265613366363363383261346661326636666264323835346166313862316133
30303039643366653966626339366634393065303564336232366162666338396536383131343137
30653130373739643935616432636362333930653963313462636139666337353830366566666230
64326231363536356361616430623439643432306635643136346439663032343661333037383437
38653036303731613237636565323537336439646362616430613830326231303063383634643531
34636635363638323461633331383561623333653436613830363062663239336239666236633038
33646234366466633164646233343165626138376661363239306563366630363362386164626461
30646433313435363461353230626464316265613038633132396133613164386634333236366566
32373463623632663337633664626165663565646430396530323462636366303631303961373565
31313561323131363935633861623537363535316463656637646431366238633438613561323032
37363565626632353665363834356363316266353135346433616530616466333730373938363264
33616564343835633437303131633665646233366130386664653137623535616466346135383234
66313061336164323538663861336265396266633138646137616138323638313035336166363638
65646164323266366564383336636263376438646561333233333838313734366335373661383062
66646261353838383637386131363832643632393661616131333363663934653630346463393034
65313331383964633165333030303565383538626563623363323635663439373464353631326265
66363066316663313439643135653132353835616331363061353739373038643439353862383031
35343663663963313333663935333530376361316237343864663164313030666630633939356264
37383662316634636434333436663633376563313135346163353232346166336133633261363637
39346163653536656263643335306164363362373965666131356464353165613731346134316334
65306535343339626537386166663364313863323130396462633365373266343939626131643264
34373066643336323336633038366662313265333266366239363566633365633266313437313363
35393332313865653466346234626461626238653263653965653235396631653536653835316533
33333264396139623534666365623366326336623630653864373837303161653363346635363738
65303762303764613764646131363364336366386136313538623635333635663761623934663439
35363463396463343663336463643532643833666563366561366562343334383631303335333833
63633065376265313365346437323231306362363465356134363065666366383732376165366136
39303561373334336234653737303565616538613936626465633661396332323032636262316534
36613764626363333139346533613866663439666238653832646136313931343038313736326231
38613764343566346433326263323438633363393335313664383635366239303430353133333662
62346439313161326335313363333539613436366231336138643664343762666433383833346533
39316236656465666638306265653635383163626638613430353666336663646333313130626263
36343565396337316432386630376163656239313963613661326138663066623165373832366330
30336463313963333764363163313734383934333065376338376431613036383162376362303537
62303764653239643763373465643066663035653639613862353563666133373864643564656333
62363666383432623536386165636530623232346265343966633030346465376338303336396164
32663737323835353337373930383536646237373132653132626561386138633738633237633161
36663539346237613132626466666262353134393062303465373365663965613632353831653762
34356531623961653031303938396361653332326266386565356262633264303965366231303533
31356339616636636535383065383737623363613332383463663465323936353538343239633031
36663865646535646434653834333831383231326563613764393464313733613130663538373731
62646464653534613633353338356664393665323633623336393333653039336463323335313735
61666337643837623132633038393833326161633364303462626533393266656239353832353733
33383766623734346439393831313566356564376233343663363434343036656631386333666330
61366362313762313138643939623738376634616432633532396363336564613362383366313862
34396439376239613261653664666264313262643234353937663335613438393135616631313635
38646563633430636130643132643332393362393265616462316138326439643530623735353439
64393633613466356263633361663334303664333939666430323333343265333333636463303331
65386263373739303833313134313235336231306237346139646564353936313035343931323165
65363238653866313463363937373338323034373338653562626237666530303238653334333337
36303039653766356466663438623030613963396238653037643066323932333865333738663134
38663139626239383536623239343430373031646461383130646434666536366232383230633364
36613535633265306534343965303736316234393966353264643431316237643136343162333935
38663431363364356131613364376636323333363534366535326437336566343664343138396163
62656364323265313138326434303636383761386338393333393364623365313536623731356562
66396263626233333863626331303065633661666638363263373732306137363731353535383964
34366530323365393832356364613232393931313030316263393866316661373531613034613565
64643433313134323334393834353237363866666665613337626239633131386430626263316637
30303538363862343030666239323934393538323531633865396564303139306666383137393536
33383732346135353838393164636339393766643336336632373738313961656266353535646231
30653934316135333633663661653838303435316332383966666338323533653938616634656131
63623966663738363935633366323162386637623830323635613361633339356136333163366636
65333631643637623337613332346438383035396533356136393563633130303662306666303730
36333337616161393362366563323364366633616539383666343336303239306162353135653666
65656664383165373063346632356639393063666563336530323234646661323135303962623565
32663062303764616131613432303766373162303337353231376365363036336161333034646232
62346337383435393164633536616132386535666335393739323237313961623333663433333639
32633333323463613338396261363931663832303135396363656337653235373837646166336361
35623663316463363965386636643732333361323365636665333235313636306534656162393936
34346338313231343061336362646538366438323731643763306432653234316465356330313030
31376335313635366435613731643232646531313563653864316464393938313538323366393431
39343134616235393336363261346334623237623033383433623431623162386161663137313138
63363533613063383663656433666564343435353430376363663036376566363661656130326566
39646665653063613131333336663864313536313364626636353033353238303661303539656663
32623939653362353462633631333137636634363836326565316161386333353437386538333539
61353534373031623663646630396630363036323639333965333235356234306133653365333961
66636534393534323130376630343064376663383836653036353862613337383564356366323566
61666134613231636663326539626537383562623336656363623861666537363133623364363465
38383330353339303730326162663137303561313034633438643733303564366264323666613565
38656132613765646135353965323534396266363962653462663963626663383961623133616261
35346136366664653965623433383734356635623638616435343661633837643134393835646435
37646463376239336361633832366534313139653738333432323837353039383435663436363134
61333232333031636464616337373366303566336430373831393339333335376130316336333433
38653062653131633132616161323166386365323035333661656266333331313763383431653464
32353234306639316264633837336639633361353336386538373765623636623836303332383066
63383432306362653263343565396234626466396464653534363231356338396334633533646532
62396361646264343839616666613135393933396262646338313331306333653463616566656564
30616464366363353930353632656135376366633831313563376630396435343061643733333031
61636633316632643839353530333532623039306337653565363332636161373837373739306236
33303138616232376437363034376234343734383931373063303037636237346534363934336437
33656466363965386136363863656237383863363961363130396431336236336661336231383030
35356530386637623861356433613035343365376435376438373830343538633037623164356533
38393138653161346437643661633432383866333339366635653236643336636337656631393230
32623662663464663432303862653863666139633261336138383731306539393032656237343965
64366538313063353765333563343365336439663638353236326633636436346136383235393738
66316237393034356433353131663232356565363932663532333662663063393737363466646533
35376130646166393938636130353137653030613563346231646635326466373161393762376537
30393839663965313435386363653638333931303163643637613664656437626239363534336461
62386438633935613966616363633937653231663431333235343232303935316662343865383566
31353931383533363861623439386563363133306261356537643266663765346432323030663337
36393461316539666432363062393162386333663139666139643463393566326164663439623564
32366265613636336437373434343164333931326563323162383163373766306265656435346137
66666466636431323161393230616465386535353630346265396532383839643966323363613938
61393332366463616230313564626539663032623064383962656632373339653066313835366163
32393235396432343062323533376161363636616130363239343036333731306662356439663731
37653833333130663862353762353436323866323032643834303630356233366465343334326637
31366335363636643939663062353661343330336231663261316164616338613833333361626430
36633966313962326263633263613063376334663736663431343037373436653730623562326238
65623737616138656233663861353366616465386637353762616465326362666165323265623337
66663563366330613564313834313635306632393962613766373037316263373764306631663233
62363031366538393533666163333437356438313933396132313434303430663335653835343564
31333135613831343931386238613239633235343239633635363231313363646562353164666535
39313363373730303334623835303839356563396631383362363366383666396630303663363665
32366362633037616237333632343662316435646665616236353136636539343136333966633232
393461313331653465333333633164613065

View File

@@ -0,0 +1,9 @@
---
pvjjk_1vos_niinisalo:
hosts:
argo.aito.tjas:
hostname: argo.aito.tjas
olympus.juva.tjas:
hostname: olympus.juva.tjas
vars:
ansible_python_interpreter: /usr/bin/python3

View File

@@ -18,7 +18,7 @@ echo "
\`--' \`-----' \`--' \`--' \`-----' \`--' \`-----' \`--' \`--' \`-----'
" "
echo " echo "
TIETOJÄRJESTELMÄASENTAJIEN INFRA TIETOJÄRJESTELMÄASENTAJIEN INTRA
MAINTAINER SCRIPT MAINTAINER SCRIPT
" "
echo -n "${normal}" echo -n "${normal}"

View File

@@ -18,23 +18,23 @@ echo "
\`--' \`-----' \`--' \`--' \`-----' \`--' \`-----' \`--' \`--' \`-----'
" "
echo " echo "
TIETOJÄRJESTELMÄASENTAJIEN INFRA TIETOJÄRJESTELMÄASENTAJIEN INTRA
PROTECT SCRIPT PROTECT SCRIPT
" "
echo -n "${normal}" echo -n "${normal}"
action=$1 action=$1
encrypt() { encrypt() {
execute "ansible-vault encrypt --vault-id infra@vault/infra" execute "ansible-vault encrypt --vault-id $1@vault/$1" $1
} }
decrypt() { decrypt() {
execute "ansible-vault decrypt --vault-id infra@vault/infra" execute "ansible-vault decrypt --vault-id $1@vault/$1" $1
} }
list() { list() {
i=0 i=0
for file in inventories/hosts.yml inventories/host_vars/*; for file in inventories/$1/group_vars/* inventories/$1/host_vars/*;
do do
i=$((i + 1)) i=$((i + 1))
echo $i")"$file echo $i")"$file
@@ -43,7 +43,7 @@ list() {
execute() { execute() {
i=0 i=0
for file in inventories/hosts.yml inventories/host_vars/*; for file in inventories/$2/group_vars/* inventories/$2/host_vars/*;
do do
i=$((i + 1)) i=$((i + 1))
echo $i")"$file echo $i")"$file
@@ -55,15 +55,15 @@ for file in inventories/hosts.yml inventories/host_vars/*;
case $action in case $action in
encrypt) encrypt)
echo "${underline}Encrypting...${nounderline}" echo "${underline}Encrypting...${nounderline}"
encrypt encrypt pvjjk-1vos-niinisalo
;; ;;
decrypt) decrypt)
echo "${underline}Decrypting...${nounderline}" echo "${underline}Decrypting...${nounderline}"
decrypt decrypt pvjjk-1vos-niinisalo
;; ;;
list) list)
echo "${underline}Listing...${nounderline}" echo "${underline}Listing...${nounderline}"
list list pvjjk-1vos-niinisalo
;; ;;
*) *)
echo "${underline}HELP${nounderline}" echo "${underline}HELP${nounderline}"

View File

@@ -8,6 +8,8 @@
tasks: tasks:
- name: "Installer" - name: "Installer"
import_tasks: tasks/installer.yml import_tasks: tasks/installer.yml
vars:
ansible_python_interpreter: "/root/.venv/ansible/bin/python3"
when: when:
- inventory_hostname == "olympus.juva.tjas" - inventory_hostname == "olympus.juva.tjas"
tags: tags:
@@ -16,6 +18,8 @@
- name: "Maintenance" - name: "Maintenance"
import_tasks: tasks/maintenance.yml import_tasks: tasks/maintenance.yml
vars:
ansible_python_interpreter: "/root/.venv/ansible/bin/python3"
when: when:
- inventory_hostname == "olympus.juva.tjas" - inventory_hostname == "olympus.juva.tjas"
tags: tags:
@@ -24,6 +28,8 @@
- name: "Deployer" - name: "Deployer"
import_tasks: tasks/deployer.yml import_tasks: tasks/deployer.yml
vars:
ansible_python_interpreter: "/root/.venv/ansible/bin/python3"
when: when:
- inventory_hostname == "olympus.juva.tjas" - inventory_hostname == "olympus.juva.tjas"
tags: tags:

View File

@@ -1,10 +1,4 @@
--- ---
- name: "Migrater"
ansible.builtin.import_tasks:
file: 'tasks/migrater.yml'
tags:
- migrater
- name: "Deployer - SSH - Add Authorized Keys" - name: "Deployer - SSH - Add Authorized Keys"
ansible.builtin.template: ansible.builtin.template:
src: './files/ssh/authorized_keys' src: './files/ssh/authorized_keys'
@@ -74,7 +68,7 @@
- name: "Deployer - Yggdrasil - Build Image" - name: "Deployer - Yggdrasil - Build Image"
containers.podman.podman_image: containers.podman.podman_image:
name: tjas-infra/yggdrasil name: pvjjk-1vos-niinisalo/yggdrasil
tag: latest tag: latest
path: "/root/data/yggdrasil" path: "/root/data/yggdrasil"
build: build:
@@ -85,7 +79,7 @@
- name: "Deployer - Yggdrasil - Run Container" - name: "Deployer - Yggdrasil - Run Container"
containers.podman.podman_container: containers.podman.podman_container:
name: yggdrasil name: yggdrasil
image: tjas-infra/yggdrasil:latest image: pvjjk-1vos-niinisalo/yggdrasil:latest
state: started state: started
recreate: on recreate: on
network: host network: host
@@ -127,6 +121,7 @@
restart_policy: always restart_policy: always
env: env:
MYSQL_ROOT_PASSWORD: "{{ config.mariadb.users.root.password }}" MYSQL_ROOT_PASSWORD: "{{ config.mariadb.users.root.password }}"
register: deployerTaskM2
when: when:
- (deployerTaskM1 is defined and deployerTaskM1.changed) or deployerTaskM1 is undefined - (deployerTaskM1 is defined and deployerTaskM1.changed) or deployerTaskM1 is undefined
tags: tags:
@@ -138,6 +133,8 @@
host: "127.0.0.1" host: "127.0.0.1"
port: "3306" port: "3306"
delay: 10 delay: 10
when:
- (deployerTaskM2 is defined and deployerTaskM2.changed) or deployerTaskM2 is undefined
tags: tags:
- mariadb - mariadb
- database - database
@@ -149,6 +146,8 @@
register: task register: task
ignore_errors: yes ignore_errors: yes
changed_when: task.stdout.find("This installation of MariaDB is already upgraded") == -1 changed_when: task.stdout.find("This installation of MariaDB is already upgraded") == -1
when:
- (deployerTaskM2 is defined and deployerTaskM2.changed) or deployerTaskM2 is undefined
tags: tags:
- mariadb - mariadb
- database - database
@@ -167,6 +166,7 @@
label: "{{ user }}" label: "{{ user }}"
loop_var: "user" loop_var: "user"
when: when:
- (deployerTaskM2 is defined and deployerTaskM2.changed) or deployerTaskM2 is undefined
- config.mariadb.users is defined - config.mariadb.users is defined
- config.mariadb.users[user] is defined - config.mariadb.users[user] is defined
- config.mariadb.users[user].username is defined - config.mariadb.users[user].username is defined
@@ -187,6 +187,7 @@
label: "{{ user }}" label: "{{ user }}"
loop_var: "user" loop_var: "user"
when: when:
- (deployerTaskM2 is defined and deployerTaskM2.changed) or deployerTaskM2 is undefined
- config.mariadb.users is defined - config.mariadb.users is defined
- config.mariadb.users[user] is defined - config.mariadb.users[user] is defined
- config.mariadb.users[user].username is defined - config.mariadb.users[user].username is defined
@@ -198,7 +199,8 @@
- name: "Deployer - Kea - Install" - name: "Deployer - Kea - Install"
ansible.builtin.apt: ansible.builtin.apt:
name: kea name:
- kea
state: latest state: latest
- name: "Deployer - Kea - Configure - DHCP4" - name: "Deployer - Kea - Configure - DHCP4"
@@ -417,54 +419,6 @@
- powerdns-authorative - powerdns-authorative
- dns - dns
- name: "Deployer - PowerDNS Authorative - Configure - Create Records"
ansible.builtin.uri:
url: "http://127.0.0.1:8081/api/v1/servers/localhost/zones/tjas."
method: PATCH
headers:
X-API-Key: "{{ config.powerdns.apiKey }}"
status_code:
- 204
body_format: json
body: "{{ records | to_json }}"
register: task
vars:
records:
rrsets:
- name: "tjas."
type: A
ttl: 3600
changetype: REPLACE
records:
- content: "192.168.2.10"
disabled: false
- name: "tjas."
type: AAAA
ttl: 3600
changetype: REPLACE
records:
- content: "201:a6d:ce01:bbe7:2189:66fe:bdb0:17ae"
disabled: false
- name: "*.tjas."
type: A
ttl: 3600
changetype: REPLACE
records:
- content: "192.168.2.10"
disabled: false
- name: "*.tjas."
type: AAAA
ttl: 3600
changetype: REPLACE
records:
- content: "201:a6d:ce01:bbe7:2189:66fe:bdb0:17ae"
disabled: false
changed_when:
- task.status == 204
tags:
- powerdns-authorative
- dns
- name: "Deployer - PowerDNS Recursor - Configure - Create Folder" - name: "Deployer - PowerDNS Recursor - Configure - Create Folder"
ansible.builtin.file: ansible.builtin.file:
path: "/root/data/powerdns-recursor/" path: "/root/data/powerdns-recursor/"
@@ -641,21 +595,6 @@
- openssl - openssl
- www - www
- name: "Deployer - OpenSSL - Configure - Copy Certificate / Root"
ansible.builtin.copy:
src: "/root/data/openssl/root/cert.pem"
dest: "/usr/local/share/ca-certificates/root.crt"
tags:
- openssl
- www
- name: "Deployer - OpenSSL - Configure - CA Certificates Update"
ansible.builtin.command:
cmd: update-ca-certificates
tags:
- openssl
- www
- name: "Deployer - OpenSSL - Configure - Generate Certificate / Intermediate" - name: "Deployer - OpenSSL - Configure - Generate Certificate / Intermediate"
community.crypto.x509_certificate: community.crypto.x509_certificate:
path: "/root/data/openssl/{{ cert }}/cert.pem" path: "/root/data/openssl/{{ cert }}/cert.pem"
@@ -685,7 +624,6 @@
ownca_path: "/root/data/openssl/{{ config.openssl.certificates[cert].issuer }}/cert.pem" ownca_path: "/root/data/openssl/{{ config.openssl.certificates[cert].issuer }}/cert.pem"
ownca_privatekey_path: "/root/data/openssl/{{ config.openssl.certificates[cert].issuer }}/privkey.pem" ownca_privatekey_path: "/root/data/openssl/{{ config.openssl.certificates[cert].issuer }}/privkey.pem"
ownca_not_after: "+30d" ownca_not_after: "+30d"
register: deployerTaskO1
loop: "{{ config.openssl.certificates.keys() | list }}" loop: "{{ config.openssl.certificates.keys() | list }}"
loop_control: loop_control:
label: "{{ cert }}" label: "{{ cert }}"
@@ -782,22 +720,14 @@
- "/root/data/openssl/{{ hostname }}/:/etc/nginx/certs/:ro" - "/root/data/openssl/{{ hostname }}/:/etc/nginx/certs/:ro"
restart_policy: always restart_policy: always
when: when:
- (deployerTaskN1 is defined and deployerTaskN1.changed) or deployerTaskN1 is undefined or (deployerTaskN2 is defined and deployerTaskN2.changed) or deployerTaskN2 is undefined or (deployerTaskO1 is defined and deployerTaskO1.changed) or deployerTaskO1 is undefined - (deployerTaskN1 is defined and deployerTaskN1.changed) or deployerTaskN1 is undefined or (deployerTaskN2 is defined and deployerTaskN2.changed) or deployerTaskN2 is undefined
tags: tags:
- nginx - nginx
- www - www
- name: "Deployer - Uptime Kuma - Files - Create Folder"
ansible.builtin.file:
path: "/root/data/uptime-kuma/"
state: directory
tags:
- uptime-kuma
- status
- name: "Deployer - Uptime Kuma - Pull Image" - name: "Deployer - Uptime Kuma - Pull Image"
containers.podman.podman_image: containers.podman.podman_image:
name: docker.io/louislam/uptime-kuma name: docker.io/louislam/uptime-kuma:latest
tag: latest tag: latest
register: deployerTaskU1 register: deployerTaskU1
@@ -809,79 +739,26 @@
recreate: on recreate: on
network: host network: host
volumes: volumes:
- "/root/data/uptime-kuma:/app/data" - "/root/data/uptime-kuma/:/app/data"
- "/root/data/openssl/root/cert.pem:/usr/local/share/ca-certificates/root.crt"
restart_policy: always restart_policy: always
env: env:
HOST: 127.0.0.1 HOST: 127.0.0.1
PORT: 3001 PORT: 3001
NODE_EXTRA_CA_CERTS: /usr/local/share/ca-certificates/root.crt
when: when:
- (deployerTaskU1 is defined and deployerTaskU1.changed) or deployerTaskU1 is undefined - (deployerTaskU1 is defined and deployerTaskU1.changed) or deployerTaskU1 is undefined
tags: tags:
- uptime-kuma - uptime-kuma
- status - status
- name: "Deployer - Keycloak - Files - Create Folder"
ansible.builtin.file:
path: "/root/data/keycloak/"
state: directory
tags:
- keycloak
- sso
- name: "Deployer - Keycloak - Files - Create Subfolders"
ansible.builtin.file:
dest: '/root/data/keycloak/{{ item.path }}'
state: directory
with_filetree: './files/keycloak/'
loop_control:
label: "{{ item.path }}"
when:
- item.state == 'directory'
tags:
- keycloak
- sso
- name: "Deployer - Keycloak - Files - Generating & Transferring Files"
ansible.builtin.template:
src: '{{ item.src }}'
dest: '/root/data/keycloak/{{ item.path }}'
register: deployerTaskC1
with_filetree: './files/keycloak/'
loop_control:
label: "{{ item.path }}"
when:
- item.state == 'file'
- not item.path.endswith('.ttf')
tags:
- keycloak
- sso
- name: "Deployer - Keycloak - Files - Transferring Files"
ansible.builtin.copy:
src: '{{ item.src }}'
dest: '/root/data/keycloak/{{ item.path }}'
register: deployerTaskC2
with_filetree: './files/keycloak/'
loop_control:
label: "{{ item.path }}"
when:
- item.state == 'file'
- item.path.endswith('.ttf')
tags:
- keycloak
- sso
- name: "Deployer - Keycloak - Pull Image" - name: "Deployer - Keycloak - Pull Image"
containers.podman.podman_image: containers.podman.podman_image:
name: quay.io/keycloak/keycloak name: quay.io/keycloak/keycloak:latest
tag: latest tag: latest
register: deployerTaskC3 register: deployerTaskC1
- name: "Deployer - Keacloak - Run Container" - name: "Deployer - Keacloak - Run Container"
containers.podman.podman_container: containers.podman.podman_container:
name: keycloak name: keacloak
image: quay.io/keycloak/keycloak:latest image: quay.io/keycloak/keycloak:latest
state: started state: started
recreate: on recreate: on
@@ -891,331 +768,23 @@
restart_policy: always restart_policy: always
env: env:
BIND: "127.0.0.1" BIND: "127.0.0.1"
KEYCLOAK_ADMIN: "{{ config.keycloak.users.admin.username }}" KEYCLOAK_ADMIN: "{{ config.keycloak.admin.username }}"
KEYCLOAK_ADMIN_PASSWORD: "{{ config.keycloak.users.admin.password }}" KEYCLOAK_ADMIN_PASSWORD: "{{ config.keycloak.admin.password }}"
PROXY_ADDRESS_FORWARDING: "true" PROXY_ADDRESS_FORWARDING: "true"
KC_DB_URL: "jdbc:mariadb://127.0.0.1:3306/{{ config.mariadb.users['keycloak'].database }}?user={{ config.mariadb.users['keycloak'].username }}&password={{ config.mariadb.users['keycloak'].password }}" KC_DB_URL: "jdbc:mariadb://127.0.0.1:3306/{{ config.mariadb.users['keycloak'].database }}?user={{ config.mariadb.users['keycloak'].username }}&password={{ config.mariadb.users['keycloak'].password }}"
KC_FEATURES: "preview" KC_FEATURES: "preview"
JAVA_OPTS_APPEND: "-Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true" JAVA_OPTS_APPEND: "-Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true"
command: "start --db mariadb --hostname-strict false --proxy-headers xforwarded --http-enabled true --spi-theme-welcome-theme=pvjjk-tjas --log-level=ERROR" command: "start --db mariadb --hostname-strict false --proxy-headers xforwarded --http-enabled true --spi-theme-welcome-theme=pvjjk-tjas --log-level=ERROR"
when: when:
- (deployerTaskC1 is defined and deployerTaskC1.changed) or deployerTaskC1 is undefined or (deployerTaskC2 is defined and deployerTaskC2.changed) or deployerTaskC2 is undefined or (deployerTaskC3 is defined and deployerTaskC3.changed) or deployerTaskC3 is undefined - (deployerTaskC1 is defined and deployerTaskC1.changed) or deployerTaskC1 is undefined
tags: tags:
- keycloak - keycloak
- sso - sso
- name: "Deployer - Keacloak - Configure - Wait"
ansible.builtin.wait_for:
host: "127.0.0.1"
port: 8080
delay: 30
tags:
- keycloak
- sso
- name: "Deployer - Keacloak - Configure - Groups : Create"
community.general.keycloak_group:
auth_keycloak_url: "http://127.0.0.1:8080"
auth_realm: master
auth_username: "{{ config.keycloak.users.admin.username }}"
auth_password: "{{ config.keycloak.users.admin.password }}"
realm: "master"
name: "{{ group }}"
vars:
task_vars:
groups:
- admin
- users
loop: "{{ task_vars.groups }}"
loop_control:
label: "{{ group }}"
loop_var: group
- name: "Deployer - Keacloak - Configure - Users : Create"
community.general.keycloak_user:
auth_keycloak_url: "http://127.0.0.1:8080"
auth_realm: master
auth_username: "{{ config.keycloak.users.admin.username }}"
auth_password: "{{ config.keycloak.users.admin.password }}"
realm: "master"
username: "{{ config.keycloak.users[username].username }}"
email: "{{ username }}@tjas"
emailVerified: on
credentials:
- type: password
value: "{{ config.keycloak.users[username].password }}"
temporary: false
groups: "{{ config.keycloak.users[username].groups | map('regex_replace', '^(.*)$', '{\"name\": \"\\1\", \"state\": \"present\"}') | map('from_json') | list }}"
enabled: on
state: present
loop: "{{ config.keycloak.users.keys() | list }}"
loop_control:
label: "{{ username }}"
loop_var: username
tags:
- keycloak
- sso
- name: "Deployer - Keacloak - Configure - Realms : Modify"
community.general.keycloak_realm:
auth_keycloak_url: "http://127.0.0.1:8080"
auth_realm: master
auth_username: "{{ config.keycloak.users.admin.username }}"
auth_password: "{{ config.keycloak.users.admin.password }}"
realm: "master"
displayName: "PVJJK TJAS"
display_name_html: ""
enabled: on
state: present
tags:
- keycloak
- sso
- name: "Deployer - Keacloak - Configure - Realms : Configure - Login"
community.general.keycloak_realm:
auth_keycloak_url: "http://127.0.0.1:8080"
auth_realm: master
auth_username: "{{ config.keycloak.users.admin.username }}"
auth_password: "{{ config.keycloak.users.admin.password }}"
realm: "master"
rememberMe: on
loginWithEmailAllowed: off
duplicateEmailsAllowed: on
verifyEmail: off
editUsernameAllowed: on
tags:
- keycloak
- sso
- name: "Deployer - Keacloak - Configure - Realms : Configure - Themes"
community.general.keycloak_realm:
auth_keycloak_url: "http://127.0.0.1:8080"
auth_realm: master
auth_username: "{{ config.keycloak.users.admin.username }}"
auth_password: "{{ config.keycloak.users.admin.password }}"
realm: "master"
loginTheme: "pvjjk-tjas"
tags:
- keycloak
- sso
- name: "Deployer - Keacloak - Configure - Realms : Configure - Client Scopes"
community.general.keycloak_clientscope:
auth_keycloak_url: "http://127.0.0.1:8080"
auth_realm: master
auth_username: "{{ config.keycloak.users.admin.username }}"
auth_password: "{{ config.keycloak.users.admin.password }}"
realm: "master"
name: "groups"
protocol: openid-connect
protocol_mappers:
- name: groups
protocol: openid-connect
protocolMapper: oidc-group-membership-mapper
config:
claim.name: groups
userinfo.token.claim: "true"
state: present
tags:
- keycloak
- sso
- name: "Deployer - Keacloak - Configure - Realms : Configure - Client Scopes : Types"
community.general.keycloak_clientscope_type:
auth_keycloak_url: "http://127.0.0.1:8080"
auth_realm: master
auth_username: "{{ config.keycloak.users.admin.username }}"
auth_password: "{{ config.keycloak.users.admin.password }}"
realm: "master"
default_clientscopes: "{{ default }}"
optional_clientscopes: "{{ optional }}"
vars:
default:
- acr
- basic
- email
- profile
- role_list
- roles
- saml_organization
- web-origins
optional:
- address
- groups
- microprofile-jwt
- offline_access
- organization
- phone
tags:
- keycloak
- sso
- name: "Deployer - Keacloak - Configure - Realms : Configure - User Profile"
community.general.keycloak_userprofile:
auth_keycloak_url: "http://127.0.0.1:8080"
auth_realm: master
auth_username: "{{ config.keycloak.users.admin.username }}"
auth_password: "{{ config.keycloak.users.admin.password }}"
realm: "master"
config:
kc_user_profile_config:
- unmanagedAttributePolicy: ADMIN_EDIT
state: present
tags:
- keycloak
- sso
- name: "Deployer - Keacloak - Configure - Users : Configure - Attributes"
community.general.keycloak_user:
auth_keycloak_url: "http://127.0.0.1:8080"
auth_realm: master
auth_username: "{{ config.keycloak.users.admin.username }}"
auth_password: "{{ config.keycloak.users.admin.password }}"
realm: "master"
username: "{{ config.keycloak.users.admin.username }}"
email: "{{ config.keycloak.users.admin.username }}@tjas"
emailVerified: on
attributes:
- name: is_temporary_admin
values: "false"
state: present
tags:
- keycloak
- sso
- name: "Deployer - Keacloak - Configure - Realms : Configure - Clients"
community.general.keycloak_client:
auth_keycloak_url: "http://127.0.0.1:8080"
auth_realm: master
auth_username: "{{ config.keycloak.users.admin.username }}"
auth_password: "{{ config.keycloak.users.admin.password }}"
realm: "master"
client_id: "{{ sso.client.id }}"
secret: "{{ sso.client.secret }}"
name: "{{ sso.client.name }}"
publicClient: false
baseUrl: "{{ sso.client.url.base }}"
redirectUris: "{{ sso.client.url.redirect }}"
default_client_scopes: "{{ default | ansible.builtin.difference(sso.scope.split(' ')[1:]) }}"
optional_client_scopes: "{{ optional + sso.scope.split(' ')[1:] }}"
state: present
vars:
default:
- acr
- basic
- email
- profile
- role_list
- roles
- saml_organization
- web-origins
optional:
- address
- microprofile-jwt
- offline_access
- organization
- phone
loop: "{{ hostvars | json_query('*.config[].*.integrations.sso') | flatten(1) }}"
loop_control:
label: "{{ sso.client.id }}"
loop_var: "sso"
tags:
- keycloak
- sso
- name: "Deployer - Keacloak - Configure - Realms : Configure - Clients : Scopes"
community.general.keycloak_clientscope_type:
auth_keycloak_url: "http://127.0.0.1:8080"
auth_realm: master
auth_username: "{{ config.keycloak.users.admin.username }}"
auth_password: "{{ config.keycloak.users.admin.password }}"
realm: "master"
client_id: "{{ sso.client.id }}"
default_clientscopes: "{{ default | ansible.builtin.difference(sso.scope.split(' ')[1:]) }}"
optional_clientscopes: "{{ optional + sso.scope.split(' ')[1:] }}"
vars:
default:
- acr
- basic
- email
- profile
- role_list
- roles
- saml_organization
- web-origins
optional:
- address
- microprofile-jwt
- offline_access
- organization
- phone
loop: "{{ hostvars | json_query('*.config[].*.integrations.sso') | flatten(1) }}"
loop_control:
label: "{{ sso.client.id }}"
loop_var: "sso"
tags:
- keycloak
- sso
- name: "Deployer - Nextcloud - Files - Create Folder"
ansible.builtin.file:
path: "/root/data/nextcloud/{{ folder }}"
state: directory
owner: www-data
group: www-data
loop: "{{ folders }}"
loop_control:
label: "{{ folder }}"
loop_var: "folder"
vars:
folders:
- html
- config
- apps
- data
tags:
- nextcloud
- cloud
- name: "Deployer - Nextcloud - Files - Create Subfolders"
ansible.builtin.file:
dest: '/root/data/nextcloud/{{ item.path }}'
state: directory
owner: www-data
group: www-data
with_filetree: './files/nextcloud/'
loop_control:
label: "{{ item.path }}"
when:
- item.state == 'directory'
tags:
- nextcloud
- cloud
- name: "Deployer - Nextcloud - Files - Generating & Transferring Files"
ansible.builtin.template:
src: '{{ item.src }}'
dest: '/root/data/nextcloud/{{ item.path }}'
register: deployerTaskE1
with_filetree: './files/nextcloud/'
loop_control:
label: "{{ item.path }}"
when:
- item.state == 'file'
tags:
- nextcloud
- cloud
- name: "Deployer - Nextcloud - Pull Image"
containers.podman.podman_image:
name: docker.io/library/nextcloud
tag: production
register: deployerTaskE2
- name: "Deployer - Nextcloud - Run Container" - name: "Deployer - Nextcloud - Run Container"
containers.podman.podman_container: containers.podman.podman_container:
name: nextcloud name: nextcloud
image: "docker.io/library/nextcloud:production" image: ""
state: started state: started
restart: yes restart: yes
network_mode: host network_mode: host
@@ -1224,8 +793,6 @@
- "/root/data/nextcloud/config:/var/www/html/config" - "/root/data/nextcloud/config:/var/www/html/config"
- "/root/data/nextcloud/apps:/var/www/html/custom_apps" - "/root/data/nextcloud/apps:/var/www/html/custom_apps"
- "/root/data/nextcloud/data:/var/www/html/data" - "/root/data/nextcloud/data:/var/www/html/data"
- "/root/data/nextcloud/config/apache2/ports.conf:/etc/apache2/ports.conf:ro"
- "/root/data/nextcloud/config/apache2/sites-enabled/000-default.conf:/etc/apache2/sites-enabled/000-default.conf:ro"
restart_policy: always restart_policy: always
env: env:
MYSQL_HOST: "127.0.0.1" MYSQL_HOST: "127.0.0.1"
@@ -1236,8 +803,6 @@
NEXTCLOUD_ADMIN_PASSWORD: "{{ config.nextcloud.users.admin.password }}" NEXTCLOUD_ADMIN_PASSWORD: "{{ config.nextcloud.users.admin.password }}"
NEXTCLOUD_TRUSTED_DOMAINS: "cloud.tjas" NEXTCLOUD_TRUSTED_DOMAINS: "cloud.tjas"
OVERWRITEPROTOCOL: "https" OVERWRITEPROTOCOL: "https"
when:
- (deployerTaskE1 is defined and deployerTaskE1.changed) or deployerTaskE1 is undefined or (deployerTaskE2 is defined and deployerTaskE2.changed) or deployerTaskE2 is undefined
tags: tags:
- nextcloud - nextcloud
- cloud - cloud
@@ -1249,7 +814,7 @@
changed_when: changed_when:
- task.stdout.find('Nextcloud was successfully installed') != -1 - task.stdout.find('Nextcloud was successfully installed') != -1
until: until:
- task.stdout.find('Nextcloud was successfully installed') != -1 or task.stdout.find('Searching for scripts (*.sh) to run, located in the folder') != -1 - task.stdout.find('Nextcloud was successfully installed') != -1 or task.stdout.find('Searching for scripts (*.sh) to run, located in the folder: /docker-entrypoint-hooks.d/before-starting') != -1
retries: 5 retries: 5
delay: 150 delay: 150
tags: tags:
@@ -1258,7 +823,7 @@
- name: "Deployer - Nextcloud - Configure - Maintenance Mode : Disable" - name: "Deployer - Nextcloud - Configure - Maintenance Mode : Disable"
containers.podman.podman_container_exec: containers.podman.podman_container_exec:
name: nextcloud container: nextcloud
user: www-data user: www-data
command: "./occ maintenance:mode --off" command: "./occ maintenance:mode --off"
register: task register: task
@@ -1273,7 +838,7 @@
- name: "Deployer - Nextcloud - Configure - Upgrade" - name: "Deployer - Nextcloud - Configure - Upgrade"
containers.podman.podman_container_exec: containers.podman.podman_container_exec:
name: nextcloud container: nextcloud
user: www-data user: www-data
command: "./occ upgrade" command: "./occ upgrade"
register: task register: task
@@ -1288,7 +853,7 @@
- name: "Deployer - Nextcloud - Configure - Database : Add Missing Indices" - name: "Deployer - Nextcloud - Configure - Database : Add Missing Indices"
containers.podman.podman_container_exec: containers.podman.podman_container_exec:
name: nextcloud container: nextcloud
user: www-data user: www-data
command: "./occ db:add-missing-indices" command: "./occ db:add-missing-indices"
register: task register: task
@@ -1301,7 +866,7 @@
- name: "Deployer - Nextcloud - Configure - Database : Add Missing Columns" - name: "Deployer - Nextcloud - Configure - Database : Add Missing Columns"
containers.podman.podman_container_exec: containers.podman.podman_container_exec:
name: nextcloud container: nextcloud
user: www-data user: www-data
command: "./occ db:add-missing-columns" command: "./occ db:add-missing-columns"
register: task register: task
@@ -1314,7 +879,7 @@
- name: "Deployer - Nextcloud - Configure - Maintenance : Repair" - name: "Deployer - Nextcloud - Configure - Maintenance : Repair"
containers.podman.podman_container_exec: containers.podman.podman_container_exec:
name: nextcloud container: nextcloud
user: www-data user: www-data
command: "./occ maintenance:repair --include-expensive" command: "./occ maintenance:repair --include-expensive"
register: task register: task
@@ -1325,7 +890,7 @@
- name: "Deployer - Nextcloud - Configure - Maintenance : Mimetypes : Database" - name: "Deployer - Nextcloud - Configure - Maintenance : Mimetypes : Database"
containers.podman.podman_container_exec: containers.podman.podman_container_exec:
name: nextcloud container: nextcloud
user: www-data user: www-data
command: "./occ maintenance:mimetype:update-db" command: "./occ maintenance:mimetype:update-db"
register: task register: task
@@ -1338,7 +903,7 @@
- name: "Deployer - Nextcloud - Configure - Maintenance : Mimetypes : Javascript" - name: "Deployer - Nextcloud - Configure - Maintenance : Mimetypes : Javascript"
containers.podman.podman_container_exec: containers.podman.podman_container_exec:
name: nextcloud container: nextcloud
user: www-data user: www-data
command: "./occ maintenance:mimetype:update-js" command: "./occ maintenance:mimetype:update-js"
register: task register: task
@@ -1351,7 +916,7 @@
- name: "Deployer - Nextcloud - Configure - System : Configure" - name: "Deployer - Nextcloud - Configure - System : Configure"
containers.podman.podman_container_exec: containers.podman.podman_container_exec:
name: nextcloud container: nextcloud
user: www-data user: www-data
command: "./occ config:system:set {{ entry.key }} --type={% if entry.value is defined and (entry.value == 'true' or entry.value == 'false') %}boolean{% else %}string{% endif %} --value={{ entry.value }}" command: "./occ config:system:set {{ entry.key }} --type={% if entry.value is defined and (entry.value == 'true' or entry.value == 'false') %}boolean{% else %}string{% endif %} --value={{ entry.value }}"
vars: vars:
@@ -1371,7 +936,7 @@
- name: "Deployer - Nextcloud - Configure - Applications : Disable" - name: "Deployer - Nextcloud - Configure - Applications : Disable"
containers.podman.podman_container_exec: containers.podman.podman_container_exec:
name: nextcloud container: nextcloud
user: www-data user: www-data
command: "./occ app:disable {{ application.identifier }}" command: "./occ app:disable {{ application.identifier }}"
vars: vars:
@@ -1410,7 +975,7 @@
- name: "Deployer - Nextcloud - Configure - Applications : Enable" - name: "Deployer - Nextcloud - Configure - Applications : Enable"
containers.podman.podman_container_exec: containers.podman.podman_container_exec:
name: nextcloud container: nextcloud
user: www-data user: www-data
command: "./occ app:enable {{ application.identifier }}" command: "./occ app:enable {{ application.identifier }}"
vars: vars:
@@ -1437,7 +1002,7 @@
- name: "Deployer - Nextcloud - Configure - Applications : Install" - name: "Deployer - Nextcloud - Configure - Applications : Install"
containers.podman.podman_container_exec: containers.podman.podman_container_exec:
name: nextcloud container: nextcloud
user: www-data user: www-data
command: "./occ app:install {{ application.identifier }}" command: "./occ app:install {{ application.identifier }}"
vars: vars:
@@ -1467,7 +1032,7 @@
- name: "Deployer - Nextcloud - Configure - Applications : Update" - name: "Deployer - Nextcloud - Configure - Applications : Update"
containers.podman.podman_container_exec: containers.podman.podman_container_exec:
name: nextcloud container: nextcloud
user: www-data user: www-data
command: "./occ app:update --all" command: "./occ app:update --all"
register: task register: task
@@ -1480,7 +1045,7 @@
- name: "Deployer - Nextcloud - Configure - Applications : Configure - OpenID Connect Login" - name: "Deployer - Nextcloud - Configure - Applications : Configure - OpenID Connect Login"
containers.podman.podman_container_exec: containers.podman.podman_container_exec:
name: nextcloud container: nextcloud
user: www-data user: www-data
command: "./occ config:system:set {{ entry.key }} --type={% if entry.value is defined and (entry.value == 'true' or entry.value == 'false') %}boolean{% else %}string{% endif %} --value={{ entry.value }}" command: "./occ config:system:set {{ entry.key }} --type={% if entry.value is defined and (entry.value == 'true' or entry.value == 'false') %}boolean{% else %}string{% endif %} --value={{ entry.value }}"
vars: vars:
@@ -1519,7 +1084,7 @@
- name: "Deployer - Nextcloud - Configure - Maintenance Mode : Disable" - name: "Deployer - Nextcloud - Configure - Maintenance Mode : Disable"
containers.podman.podman_container_exec: containers.podman.podman_container_exec:
name: nextcloud container: nextcloud
user: www-data user: www-data
command: "./occ maintenance:mode --off" command: "./occ maintenance:mode --off"
register: task register: task

View File

@@ -1,35 +1,35 @@
--- ---
- name: "Installer : Python 3 : Install" - name: "Init : Python 3 : Install"
ansible.builtin.raw: apt install -y python3 python3-pip python3-setuptools python3-venv python3-dev ansible.builtin.raw: apt install -y python3 python3-pip python3-setuptools python3-venv python3-dev
register: task register: task
changed_when: changed_when:
- "task.stdout.find('0 upgraded, 0 newly installed, 0 to remove') == -1" - "task.stdout.find('0 upgraded, 0 newly installed, 0 to remove') == -1"
- name: "Installer: Python 3 : Libraries - APT" - name: "Init: Python 3 : Libraries - APT"
ansible.builtin.raw: apt install -y python3-apt ansible.builtin.raw: apt install -y python3-apt
register: task register: task
changed_when: changed_when:
- "task.stdout.find('0 upgraded, 0 newly installed, 0 to remove') == -1" - "task.stdout.find('0 upgraded, 0 newly installed, 0 to remove') == -1"
- name: "Installer : Python 3 : Configure - Virtual Environment : Test" - name: "Init : Python 3 : Configure - Virtual Environment : Test"
ansible.builtin.raw: "/opt/ansible/bin/pip3" ansible.builtin.raw: "/root/.venv/ansible/bin/pip3"
register: task632 register: task632
changed_when: false changed_when: false
failed_when: false failed_when: false
- name: "Installer : Python 3 : Configure - Virtual Environment : Delete" - name: "Init : Python 3 : Configure - Virtual Environment : Delete"
ansible.builtin.file: ansible.builtin.file:
path: "/opt/ansible" path: "/root/.venv/ansible"
state: absent state: absent
when: when:
- "task632.stdout.find(\"ModuleNotFoundError: No module named 'pip'\") != -1" - "task632.stdout.find(\"ModuleNotFoundError: No module named 'pip'\") != -1"
- name: "Installer : Python 3 : Configure - Virtual Environment : Create" - name: "Init : Python 3 : Configure - Virtual Environment : Create"
ansible.builtin.pip: ansible.builtin.pip:
name: pip name: pip
state: latest state: latest
extra_args: --upgrade extra_args: --upgrade
virtualenv: /opt/ansible virtualenv: /root/.venv/ansible
virtualenv_command: "python3 -m venv" virtualenv_command: "python3 -m venv"
- name: "Installer : Tools : Install" - name: "Installer : Tools : Install"
@@ -78,13 +78,6 @@
tags: tags:
- motd - motd
- name: "Installer : Resolv.conf : Configure - Copy File"
ansible.builtin.template:
src: './files/resolv.conf'
dest: '/etc/resolv.conf'
tags:
- resolv
- name: "Installer : Networking : Configure - Copy Configuration" - name: "Installer : Networking : Configure - Copy Configuration"
ansible.builtin.template: ansible.builtin.template:
src: './files/networking/interfaces' src: './files/networking/interfaces'
@@ -103,27 +96,18 @@
- name: "Installer : FirewallD : Dependencies - Packages" - name: "Installer : FirewallD : Dependencies - Packages"
ansible.builtin.apt: ansible.builtin.apt:
name: "{{ package }}" name:
state: latest
vars:
ansible_python_interpreter: /usr/bin/python3
packages:
- python3-firewall - python3-firewall
- iptables - iptables
loop: "{{ packages }}" state: latest
loop_control:
label: "{{ package }}"
loop_var: "package"
tags: tags:
- firewalld - firewalld
- firewall - firewall
- name: "Installer : FirewallD : Install" - name: "Installer : FirewallD : Install"
ansible.builtin.apt: ansible.builtin.apt:
name: firewalld name: "firewalld"
state: latest state: latest
vars:
ansible_python_interpreter: /usr/bin/python3
tags: tags:
- firewalld - firewalld
- firewall - firewall
@@ -145,7 +129,6 @@
immediate: true immediate: true
offline: true offline: true
vars: vars:
ansible_python_interpreter: /usr/bin/python3
services: services:
- http - http
- https - https
@@ -160,47 +143,12 @@
- firewalld - firewalld
- firewall - firewall
- name: "Installer : Ansible : Dependencies - Packages (APT / Debian & Ubuntu & Linux Mint)"
ansible.builtin.apt:
name: "{{ packages }}"
state: latest
vars:
ansible_python_interpreter: /usr/bin/python3
packages:
- sshpass
- lsb-release
loop: "{{ packages }}"
loop_control:
label: "{{ package }}"
loop_var: "package"
- name: "Installer : Ansible : Dependencies - Python Libraries"
ansible.builtin.pip:
name: "{{ library }}"
state: latest
extra_args: --upgrade
virtualenv: /opt/ansible
virtualenv_command: "python3 -m venv"
vars:
libraries:
- cryptography
- dnspython
- hvac
- jmespath
- netaddr
- pexpect
- xmltodict
loop: "{{ libraries }}"
loop_control:
label: "{{ library }}"
loop_var: "library"
- name: "Installer - Ansible - Python Library" - name: "Installer - Ansible - Python Library"
ansible.builtin.pip: ansible.builtin.pip:
name: ansible name: ansible
state: latest state: latest
extra_args: --upgrade extra_args: --upgrade
virtualenv: /opt/ansible virtualenv: /root/.venv/ansible
virtualenv_command: "python3 -m venv" virtualenv_command: "python3 -m venv"
tags: tags:
- ansible - ansible
@@ -214,7 +162,7 @@
- name: "Installer : Ansible : Create Symbolic Links" - name: "Installer : Ansible : Create Symbolic Links"
ansible.builtin.file: ansible.builtin.file:
src: /opt/ansible/bin/{{ binary }} src: /root/.venv/ansible/bin/{{ binary }}
dest: /root/bin/{{ binary }} dest: /root/bin/{{ binary }}
state: link state: link
vars: vars:
@@ -237,12 +185,34 @@
tags: tags:
- ansible - ansible
- name: "Installer - Ansible - Dependencies - Python Libraries"
ansible.builtin.pip:
name: "{{ library }}"
state: latest
extra_args: --upgrade
virtualenv: /root/.venv/ansible
virtualenv_command: "python3 -m venv"
vars:
libraries:
- cryptography
- dnspython
- hvac
- jmespath
- netaddr
- pexpect
loop: "{{ libraries }}"
loop_control:
label: "{{ library }}"
loop_var: "library"
tags:
- ansible
- name: "Installer : MariaDB : Dependencies - Python Library : pymysql" - name: "Installer : MariaDB : Dependencies - Python Library : pymysql"
ansible.builtin.pip: ansible.builtin.pip:
name: pymysql name: pymysql
state: latest state: latest
extra_args: --upgrade extra_args: --upgrade
virtualenv: /opt/ansible virtualenv: /root/.venv/ansible
virtualenv_command: "python3 -m venv" virtualenv_command: "python3 -m venv"
tags: tags:
- mariadb - mariadb
@@ -250,46 +220,37 @@
- name: "Installer : MariaDB : Dependencies - Package : mariadb-client" - name: "Installer : MariaDB : Dependencies - Package : mariadb-client"
ansible.builtin.apt: ansible.builtin.apt:
name: mariadb-client name: "mariadb-client"
state: latest state: latest
vars:
ansible_python_interpreter: /usr/bin/python3
tags: tags:
- mariadb - mariadb
- database - database
- name: "Installer : Podman : Install" - name: "Installer : Podman : Install"
ansible.builtin.apt: ansible.builtin.apt:
name: "{{ package }}" name:
state: latest
vars:
ansible_python_interpreter: /usr/bin/python3
packages:
- podman - podman
- podman-compose - podman-compose
- netavark - netavark
- buildah - buildah
- slirp4netns - slirp4netns
loop: "{{ packages }}" state: latest
loop_control:
label: "{{ package }}"
loop_var: "package"
tags: tags:
- podman - podman
- name: "Installer : Schedule : Maintenance" - name: "Installer : Schedule : Maintenance"
ansible.builtin.cron: ansible.builtin.cron:
name: "Tietojärjestelmäasentajien Infra - Maintenance" name: "{{ location | upper }} - Infra - Maintenance"
hour: "*/3" hour: "*/3"
minute: "0" minute: "0"
job: "/opt/ansible/bin/ansible-pull -U ssh://git@github.com/cwchristerw/tjas-infra -d /root/.ansible/pull/infra --accept-host-key --private-key /root/.ssh/keys/infra --vault-password-file /root/.ansible/vault/infra tasks.yml -t maintenance" job: "/root/.venv/ansible/bin/ansible-pull -U ssh://git@github.com/cwchristerw/tjas-infra -d /root/.ansible/pull/pvjjk-1vos-niinisalo/infra --accept-host-key --private-key /root/.ssh/keys/pvjjk-1vos-niinisalo/infra --vault-password-file /root/.ansible/vault/pvjjk-1vos-niinisalo tasks.yml -t maintenance"
tags: tags:
- cron - cron
- name: "Installer : Schedule : Deployer" - name: "Installer : Schedule : Deployer"
ansible.builtin.cron: ansible.builtin.cron:
name: "Tietojärjestelmäasentajien Infra - Deployer" name: "{{ location | upper }} - Infra - Deployer"
minute: "*/5" minute: "*/5"
job: "/opt/ansible/bin/ansible-pull -U ssh://git@github.com/cwchristerw/tjas-infra -d /root/.ansible/pull/infra --accept-host-key --private-key /root/.ssh/keys/infra --vault-password-file /root/.ansible/vault/infra tasks.yml -t deployer" job: "/root/.venv/ansible/bin/ansible-pull -U ssh://git@github.com/cwchristerw/tjas-infra -d /root/.ansible/pull/pvjjk-1vos-niinisalo/infra --accept-host-key --private-key /root/.ssh/keys/pvjjk-1vos-niinisalo/infra --vault-password-file /root/.ansible/vault/pvjjk-1vos-niinisalo tasks.yml -t deployer"
tags: tags:
- cron - cron

View File

@@ -4,7 +4,7 @@
name: "{{ library }}" name: "{{ library }}"
state: latest state: latest
extra_args: --upgrade extra_args: --upgrade
virtualenv: /opt/ansible virtualenv: /root/.venv/ansible
virtualenv_command: "python3 -m venv" virtualenv_command: "python3 -m venv"
vars: vars:
libraries: libraries:
@@ -24,7 +24,7 @@
name: ansible name: ansible
state: latest state: latest
extra_args: --upgrade extra_args: --upgrade
virtualenv: /opt/ansible virtualenv: /root/.venv/ansible
virtualenv_command: "python3 -m venv" virtualenv_command: "python3 -m venv"
- name: "Maintenance : MariaDB : Dependencies / Python Library : pymysql" - name: "Maintenance : MariaDB : Dependencies / Python Library : pymysql"
@@ -32,7 +32,7 @@
name: pymysql name: pymysql
state: latest state: latest
extra_args: --upgrade extra_args: --upgrade
virtualenv: /opt/ansible virtualenv: /root/.venv/ansible
virtualenv_command: "python3 -m venv" virtualenv_command: "python3 -m venv"
- name: "Maintenance : Podman : Prune" - name: "Maintenance : Podman : Prune"

View File

@@ -1,133 +0,0 @@
---
- name: "Migrater - Copy Secrets"
ansible.builtin.copy:
src: "{{ file.src }}"
dest: "{{ file.dest }}"
vars:
files:
- src: /root/.ssh/keys/{{ location | lower | replace('.', '') | replace(' ', '-') }}/infra
dest: /root/.ssh/keys/infra
- src: /root/.ansible/vault/{{ location | lower | replace('.', '') | replace(' ', '-') }}/infra
dest: /root/.ansible/vault/infra
loop: "{{ files }}"
loop_control:
label: "{{ file }}"
loop_var: "file"
when:
- file.src is ansible.builtin.file
- name: "Migrater : Python 3 : Configure - Virtual Environment : Test"
ansible.builtin.raw: "/opt/ansible/bin/pip3"
register: task632
changed_when: false
failed_when: false
- name: "Migrater : Python 3 : Configure - Virtual Environment : Delete"
ansible.builtin.file:
path: "/opt/ansible"
state: absent
when:
- "task632.stdout.find(\"ModuleNotFoundError: No module named 'pip'\") != -1"
- name: "Migrater : Python 3 : Configure - Virtual Environment : Create"
ansible.builtin.pip:
name: pip
state: latest
extra_args: --upgrade
virtualenv: /opt/ansible
virtualenv_command: "python3 -m venv"
- name: "Migrater : Ansible : Dependencies - Packages"
ansible.builtin.apt:
name: "{{ package }}"
state: latest
vars:
ansible_python_interpreter: /usr/bin/python3
packages:
- sshpass
- lsb-release
loop: "{{ packages }}"
loop_control:
label: "{{ package }}"
loop_var: "package"
- name: "Migrater : Ansible : Dependencies - Python Libraries"
ansible.builtin.pip:
name: "{{ library }}"
state: latest
extra_args: --upgrade
virtualenv: /opt/ansible
virtualenv_command: "python3 -m venv"
vars:
libraries:
- cryptography
- dnspython
- hvac
- jmespath
- netaddr
- pexpect
- xmltodict
loop: "{{ libraries }}"
loop_control:
label: "{{ library }}"
loop_var: "library"
- name: "Migrater - Ansible - Python Library"
ansible.builtin.pip:
name: ansible
state: latest
extra_args: --upgrade
virtualenv: /opt/ansible
virtualenv_command: "python3 -m venv"
tags:
- ansible
- name: "Migrater : Ansible : Create Symbolic Links"
ansible.builtin.file:
src: /opt/ansible/bin/{{ binary }}
dest: /bin/{{ binary }}
state: link
vars:
binaries:
- ansible
- ansible-community
- ansible-config
- ansible-console
- ansible-doc
- ansible-galaxy
- ansible-inventory
- ansible-playbook
- ansible-pull
- ansible-test
- ansible-vault
loop: "{{ binaries }}"
loop_control:
label: "{{ binary }}"
loop_var: "binary"
tags:
- ansible
- name: "Migrater - Schedule : Maintenance"
ansible.builtin.cron:
name: "Tietojärjestelmäasentajien Infra - Maintenance"
hour: "*/3"
minute: "0"
job: "/opt/ansible/bin/ansible-pull -U ssh://git@github.com/cwchristerw/tjas-infra -d /root/.ansible/pull/infra --accept-host-key --private-key /root/.ssh/keys/infra --vault-password-file /root/.ansible/vault/infra tasks.yml -t maintenance"
- name: "Migrater - Schedule : Maintenance"
ansible.builtin.cron:
name: "Tietojärjestelmäasentajien Infra - Maintenance"
minute: "*/5"
job: "/opt/ansible/bin/ansible-pull -U ssh://git@github.com/cwchristerw/tjas-infra -d /root/.ansible/pull/infra --accept-host-key --private-key /root/.ssh/keys/infra --vault-password-file /root/.ansible/vault/infra tasks.yml -t deployer"
- name: "Migrater - Schedule : Deployer"
ansible.builtin.cron:
name: "{{ location | upper }} - Infra - Deployer"
state: absent
- name: "Migrater - Schedule : Maintenance"
ansible.builtin.cron:
name: "{{ location | upper }} - Infra - Maintenance"
state: absent
tags:
- cron