Compare commits

..

1 Commits

Author SHA1 Message Date
Christer Warén
cc2cf1ea39 Add CA Certificates Update task to Uptime Kuma 2025-09-14 14:48:21 +03:00
28 changed files with 302 additions and 1023 deletions

View File

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

View File

@@ -1,5 +1,5 @@
[defaults]
inventory = inventories
inventory = inventories/pvjjk-1vos-niinisalo
hash_behaviour = merge
gathering = smart
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
{{ hostname | upper }}
{{ location | upper }}
Made by
Jääkäri Warén

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -16,8 +16,8 @@
<!-- Link: Preconnect & DNS Prefetch & Preload -->
<link rel="preconnect" 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="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="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.0.0/webfonts/fa-solid-900.woff2" crossorigin="anonymous">
<style>
body {
@@ -67,7 +67,7 @@
</style>
<!-- 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>
<body>
<header>

View File

@@ -1 +1,2 @@
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..."
apt update
sudo apt update
echo -e "\n\n"
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"
ti-header "Luodaan Ansiblelle virtuaalinen ympäristö..."
python3 -m venv /opt/ansible
python3 -m venv $HOME/.venv/ansible
echo -e "\n\n"
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"
ti-header "Asennetaan Ansible..."
/opt/ansible/bin/pip3 install ansible
$HOME/.venv/ansible/bin/pip3 install ansible
echo -e "\n\n"
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"
mkdir -p $HOME/.ssh/keys &> /dev/null
if [[ ! -f $HOME/.ssh/keys/infra ]]
mkdir -p $HOME/.ssh/keys/pvjjk-1vos-niinisalo &> /dev/null
if [[ ! -f $HOME/.ssh/keys/pvjjk-1vos-niinisalo/infra ]]
then
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"
fi
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]"
while [[ -z $SSHKEY_QUESTION || ! -z $SSHKEY_QUESTION && $SSHKEY_QUESTION != "K" ]]
@@ -80,7 +80,7 @@ done
echo -e "\n\n"
mkdir -p $HOME/.ansible/vault &> /dev/null
if [[ ! -f $HOME/.ansible/vault/infra ]]
if [[ ! -f $HOME/.ansible/vault/pvjjk-1vos-niinisalo ]]
then
ti-header "Syötä Ansible Vaultin salasana..."
echo -n "Salasana: "
@@ -90,14 +90,14 @@ then
if [[ ! -z $VAULT_PASSWORD ]]
then
echo "$VAULT_PASSWORD" > $HOME/.ansible/vault/infra
echo "$VAULT_PASSWORD" > $HOME/.ansible/vault/pvjjk-1vos-niinisalo
fi
done
echo -e "\n\n"
fi
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 "

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
31336463653963313966646235346238623462333733313535336332633533623437646266386433
6461336464326636313166303738663033303838313138660a653430373665333438653037613262
62326232393864353639336463313438616537396561623564663531363533646437396539623239
3337303265313538330a613831663136353439353132343631313938333831396665393061623832
30313336653539663364336139633538653237646436653532656465326137653863653665353564
3930333936663234613566346132326238393863313163363366

View File

@@ -0,0 +1,6 @@
$ANSIBLE_VAULT;1.2;AES256;pvjjk-1vos-niinisalo
61373664346238383532383233653236313665356163633438333031323734396466303263386637
3561663839653238313163323236663336336535646266620a653963643632346338393865623737
33336639656236383638303664656461653039643465623464336464303136323062613130306631
6265636465313834650a663263353833633363653231353834313237663938363261656335613136
6130

View File

@@ -0,0 +1,148 @@
$ANSIBLE_VAULT;1.2;AES256;pvjjk-1vos-niinisalo
62343938363461336438303861633037346462383865333837346639343034353161386538356638
3663613435336664663832353035616435623733623335650a643866303564393030663434336437
61343438316538343536633538313436636662623834646533353962303135626331666339613539
6662376266333064310a326638643665393035623863376536323735333365376336373638343838
64383934643134346363383164333739623163386266643530333638623130303333656262616331
61663933376266303533663333353831313136303137323462363930373465396239333065316565
36653364373530393031343862623636363035333661653165656532353564333734303737373636
64623665336232326463653962633765336631343131663765666264336433616638643963663730
61396433623633636334323938306264393063613130316331623237663562356433633532326165
39303263623864343036363534626361376331373139633436363265316633393939353164356463
65626333323565653361656336333234626362386362646139353765366333343836393833663537
35393131363539303437663834663336353466643935623833643666623333373234386338386635
31353436666230623965663036363539313030396331376230316633626564363632626462666235
65303736323334633462303138636163626163613864366534653264396633396535613537613439
39366465346237393037616236656362663637383762656338353862623336303864363761356535
62386130336635663236613137626530633834306430326438656261363462393132646439396131
33393933373539613565323933663434383839363030346532643233393239653130666137623731
63393861313831383936373066663962393763613561643937346434656262623239346264303234
34313439333265666666633666646330326137353132306533646532623265653534363338376534
38363563343862336639393462303731313338336535346666313939653735306136383330373431
36656163366162363739363939356535386664633563336236336537393862363062633032343464
34306364376465653338613833313066383936383264376362656266383532333539643731636338
38633331643237653138653734343531623764613761393861653664313737393938383161626364
34636635613063613239633366336362303462646439373065663737336132643163626639356535
30623830346461633631613538383434623534653331356430353532656661346230623734646232
66366664393863626633303132313435343764653931623236366534613332386330656563383964
64303039393061316633663530636131646533313432343661643230316334333334326261346331
32333038646331656164386464383061363039313939616462633532303764613266623837323463
66323433316338333265656131313830373536626230613565613134346534346238326431653162
64626631643637313339376266303462313833616537396532356536386130306334343262353433
66343633303934356161643936656136363830656565633935666439633231343439646434303536
36376161313564613638663831343865303238383634303834303034373834306263306166633131
37326565316237623134363437613861326631366364353964616330326162366363333539346165
35363933623962363539643463313434353939383362353839613531643566626636623435636638
65373932393362323730353964663263356433323064356339343133613230373030326534616363
39303832393032613739663762663334393136363832336663346138636530376637353135646663
31396538376265666435656462656463643032393761623739396531353838663630363962333466
32643533346139343366343432666664613138373661306232623466333961626435326432643831
61363236306562613264643335363235343634303034373739353466396436373736646665623139
63376534316132326463393136393431383131636530383766633464623235616330643132333933
63303137633531323064376439623561666632623038373132373861356237336236396363663566
63313834303462343134633230333532316131306431316236656333373863383833323233303931
32376138333433663034353739663766366135316566623830316332616366323933356266303435
66666163326362656562613630333030636537343837323637383039393538613266333065643763
33376138386238626636376434343030323565333639303532383039303637313033623561303162
32383766313961326566626139646466666138353537303131313838613762303335386232313264
63393732353638343562333932373235313766633738656536306264346431306130366633383839
66363765366164373761386635646137626132666538653465646336303365633330663065313437
34326430303139346364636334363734343437343738313437303131353132636338653566633561
35386536363235663965613035393739373261376433343962383666306234343138363931313661
37633165313964646565633934613662343038653339386366393265653537396138363762393464
39623161663662643862336236626130353862303761656261616464623462353164366264666265
63363236316363646165333833663438356136623865336461373534326464376437326339666165
64663834356630333639346266373930626361633836313330396261323065333337313930653037
36323039613966366164626362666364313761306566343463343762393166633831373237393931
64363830633236313339303433316432646634323530613065393633363635316366636532386266
63326139333336613534623661653830383761313638663236616463336136336263663762376232
64366436326135666637333265663631343862623063353762616334303061343930623637653136
31326163346662386337313637303861393830303862396538616339633931643632396530633736
34336365383165623537303430326633653434396533316464346661353861623662343235663731
62616435623434333934396136646636363532656537626364663731653934643663336135383461
62666239326238326235383034306664343039613235396139336636636166653066366163623462
64346535383239656533303038303862306630326139663335326664656137323931393463633736
30663631366139313035346666353235326563353037653030313936393237396631353965663439
31373337616261636539383339393961376135366561633261396235636437383237313533373039
39316363653062313834313831653036356236623334343061336266643062383938316264613764
35396536323236343961643136363366653438303839313965393563323762346161636539326266
33373039346533373339313166623732613166303564326637333837636262303838356666303239
61386539656337306163383266306231336239396534626430613434616163343230336234653836
64323036373931623662373534316232303862393736383733643462366231613363643835316535
64653039656464336638663263613665663563386132303737653064373666643062346132313365
62323666303835383563316539346236326334663463363861363566323236333264666134363532
30656466316337373238306266383965343133633239373236353461303033613534626437336637
64323565376237626665393466373063666138346666356162663734623063653833613230383335
30316539643939306366353931326434353534306535346463373833333964626137303535643334
61666137366234373466616339663463663564343434373065346231306131386330303165616564
63363339316530666532396632386465376236633362363034366131633966653035333039373733
38343366346337336332646464383130653063396631306463336461313932363162363737663462
66356165613266353636633438613236396263646538323434663234396164623833373630363937
62643161376135336564636231643631383933366430643365393239623965303035383461396162
39333033373664356565353565666666656663303064643133386464383863613465616130316636
36653633366639303235303139663235393065353832656162613738346663623364613634653439
61336330396332323738353365393732386365353538653461303163333966646638636363613833
36616561646165356232363038343364663732303239386166663134396232336430323231333062
39663062373135333364333436323538306335373334373232336562363866666165333938623037
66363463353064386130303936623663323932613432373266613136306662653438313531636234
30346439353735366434343164333863626161626630633236613365396332386562373136393236
38653130643165646232356130336266656530366362393833613861643366366466306366623035
37646163613632646339376534643661363836376333643136396138323265376461363038363531
65366130306466393637326161303434383862316464646533386639613236383632373866343336
31353235303235326463376139373931663831623134323334343866386633626161656634376632
39366434616132643662386230383535323835313364393964616235396230376631336464626561
62636561333262326162356438613165633332663430343337636263626330663461633966316566
30623330386138666165613034343030373265373733633562363663633366653530373366623234
64313630383238346638633065636639386634643039633962366137303135663536346366653265
34336130396565656336346166366633376137303030316262656364343238383562633265333035
63653461613131623232636538663235663334306166303238616664656334303265353632613034
65613361373334643831386335663739613634303536343039313134353965633464386138353362
64373662373065366463396534636338326566353431626364313765333264646135626335376434
62326330323963346231313237333464393130363561653263373263356436313863626132373662
31663330626165353331623034646139353861393163306262643961386430643666393038663238
64316537373261396537626564343162333436656635323863323339316165623261386131396262
34356132653637326231326363326161393534353864666364346466303264333536336135623863
35653833313432323861363436356263373835653864316665633965393465663965623864646361
36376433383764643034386162356137333638636135396466653831306330653232646630663739
30366333656461373437613733333034303531623535626330633964643934643535303266373035
61346361393766353930333938613562663366363432666466343439303730383265633561656163
31303532653162656564316531363036326537616231376166323339313635663363633836613438
36366534333261306337643766336163333265666461643836623531323765363766363237303661
36353431623734396538613135376666646664323036363638663661393136373638366631623762
32623533336231363065613637316636663061616339393133343366303165333564313531363166
63376331373033343164363134653466626265343134616235643263363435663462643637363639
66623666386235633530663166663666623336376362316562393931626366303531313334626234
65373134316132346562386565366337613032313962346539363038366535613163346564386262
30643661633133333262633966313738653533363034326232346161613538666462383235656264
36353430363735666239383762333363333234666232396235356237383230613439653366383831
39303030393538653763393763323031316433633164643166383464633837626466613463346631
33336461383638643262663563393161323465646463653735633661633561396233383338653131
34666534656438376633643630653866333631326236633463343434326436353334366564393737
36323362613635666564613936333539623637303764653166313637653630616164316162353637
62643439323136393965623332643965353166323434666632636335303833323337306662616434
64363862643964346330666439356130316263306266343063633939666664313934303631326262
37646336663466363734306637353433643466656564623831643634393366333065303235663032
39633631303034613536663133363831383835343563366164613332333439306265636330333539
66316130336631656262323863613239356632646139353037376438626634626331303166396531
30623331363638666262393430623030366162393665396664613538386431653539666533373535
31333534323531663665376538383362343431366561326365666539336562663532633864316566
63393236393062333135373133326634613565613537633134333662646431313133363536323634
65653339353266613166396635646436373631643433376263366135623461326162336539613634
31323666393335656664393736336562303261356162363239663135336463626636626463613739
38303437303235346463393232346263623366363735373231386166646438316230383462613961
30393465356631643965303339616435323037303434383237303430353130373161366435313537
31376636323136613761343130366632356261336230386662336430636435313131323030313836
33363932396535363232623061373135643765346635356431636363356431396364373338653266
33626234346636326235613730646538626563666631333663663236653638376531313138653539
34303631376439303863613839373164663364626337366131623231386363616637633033346335
30363931653631623033613064656263323366373962336637363462383563663832376561336166
63306464623765323562343438383665343730376335626133303561663961633037373336323233
63323830333433303033623062643663643639373239393136626362353539316162613361626539
39386330346364383530353838633530353562336435646430383534313736616163636434346531
38623662333331366430386663646362613732616230663732386163633432363338333030633735
31363836316261326135373239333966363061613564633365306462386537316237623261653735
38336133393035653736366564383431366162623061393161663732613536346132666236373436
65393862303634303530326534656333653163366432616162396436643836646537383139613338
33613532333865386564343365386238336561626331663462633130626537346532633230353636
32373530346630373365633161653863383638376431643361636563613132643839653239626661
376239633162646562313264633632666366

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 "
TIETOJÄRJESTELMÄASENTAJIEN INFRA
TIETOJÄRJESTELMÄASENTAJIEN INTRA
MAINTAINER SCRIPT
"
echo -n "${normal}"

View File

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

View File

@@ -8,6 +8,8 @@
tasks:
- name: "Installer"
import_tasks: tasks/installer.yml
vars:
ansible_python_interpreter: "/root/.venv/ansible/bin/python3"
when:
- inventory_hostname == "olympus.juva.tjas"
tags:
@@ -16,6 +18,8 @@
- name: "Maintenance"
import_tasks: tasks/maintenance.yml
vars:
ansible_python_interpreter: "/root/.venv/ansible/bin/python3"
when:
- inventory_hostname == "olympus.juva.tjas"
tags:
@@ -24,6 +28,8 @@
- name: "Deployer"
import_tasks: tasks/deployer.yml
vars:
ansible_python_interpreter: "/root/.venv/ansible/bin/python3"
when:
- inventory_hostname == "olympus.juva.tjas"
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"
ansible.builtin.template:
src: './files/ssh/authorized_keys'
@@ -74,7 +68,7 @@
- name: "Deployer - Yggdrasil - Build Image"
containers.podman.podman_image:
name: tjas-infra/yggdrasil
name: pvjjk-1vos-niinisalo/yggdrasil
tag: latest
path: "/root/data/yggdrasil"
build:
@@ -85,7 +79,7 @@
- name: "Deployer - Yggdrasil - Run Container"
containers.podman.podman_container:
name: yggdrasil
image: tjas-infra/yggdrasil:latest
image: pvjjk-1vos-niinisalo/yggdrasil:latest
state: started
recreate: on
network: host
@@ -198,7 +192,8 @@
- name: "Deployer - Kea - Install"
ansible.builtin.apt:
name: kea
name:
- kea
state: latest
- name: "Deployer - Kea - Configure - DHCP4"
@@ -815,13 +810,21 @@
env:
HOST: 127.0.0.1
PORT: 3001
NODE_EXTRA_CA_CERTS: /usr/local/share/ca-certificates/root.crt
when:
- (deployerTaskU1 is defined and deployerTaskU1.changed) or deployerTaskU1 is undefined
tags:
- uptime-kuma
- status
- name: "Deployer - Uptime Kuma - Configure - CA Certificates Update"
containers.podman.podman_container_exec:
container: uptime-kuma
user: root
command: "update-ca-certificates"
tags:
- uptime-kuma
- status
- name: "Deployer - Keycloak - Files - Create Folder"
ansible.builtin.file:
path: "/root/data/keycloak/"
@@ -862,7 +865,7 @@
ansible.builtin.copy:
src: '{{ item.src }}'
dest: '/root/data/keycloak/{{ item.path }}'
register: deployerTaskC2
register: deployerTaskC1
with_filetree: './files/keycloak/'
loop_control:
label: "{{ item.path }}"
@@ -877,7 +880,7 @@
containers.podman.podman_image:
name: quay.io/keycloak/keycloak
tag: latest
register: deployerTaskC3
register: deployerTaskC2
- name: "Deployer - Keacloak - Run Container"
containers.podman.podman_container:
@@ -899,260 +902,7 @@
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"
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
tags:
- keycloak
- 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"
- (deployerTaskC1 is defined and deployerTaskC1.changed) or deployerTaskC1 is undefined or (deployerTaskC2 is defined and deployerTaskC2.changed) or deployerTaskC2 is undefined
tags:
- keycloak
- sso
@@ -1161,8 +911,6 @@
ansible.builtin.file:
path: "/root/data/nextcloud/{{ folder }}"
state: directory
owner: www-data
group: www-data
loop: "{{ folders }}"
loop_control:
label: "{{ folder }}"
@@ -1181,8 +929,6 @@
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 }}"
@@ -1249,7 +995,7 @@
changed_when:
- task.stdout.find('Nextcloud was successfully installed') != -1
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
delay: 150
tags:
@@ -1258,7 +1004,7 @@
- name: "Deployer - Nextcloud - Configure - Maintenance Mode : Disable"
containers.podman.podman_container_exec:
name: nextcloud
container: nextcloud
user: www-data
command: "./occ maintenance:mode --off"
register: task
@@ -1273,7 +1019,7 @@
- name: "Deployer - Nextcloud - Configure - Upgrade"
containers.podman.podman_container_exec:
name: nextcloud
container: nextcloud
user: www-data
command: "./occ upgrade"
register: task
@@ -1288,7 +1034,7 @@
- name: "Deployer - Nextcloud - Configure - Database : Add Missing Indices"
containers.podman.podman_container_exec:
name: nextcloud
container: nextcloud
user: www-data
command: "./occ db:add-missing-indices"
register: task
@@ -1301,7 +1047,7 @@
- name: "Deployer - Nextcloud - Configure - Database : Add Missing Columns"
containers.podman.podman_container_exec:
name: nextcloud
container: nextcloud
user: www-data
command: "./occ db:add-missing-columns"
register: task
@@ -1314,7 +1060,7 @@
- name: "Deployer - Nextcloud - Configure - Maintenance : Repair"
containers.podman.podman_container_exec:
name: nextcloud
container: nextcloud
user: www-data
command: "./occ maintenance:repair --include-expensive"
register: task
@@ -1325,7 +1071,7 @@
- name: "Deployer - Nextcloud - Configure - Maintenance : Mimetypes : Database"
containers.podman.podman_container_exec:
name: nextcloud
container: nextcloud
user: www-data
command: "./occ maintenance:mimetype:update-db"
register: task
@@ -1338,7 +1084,7 @@
- name: "Deployer - Nextcloud - Configure - Maintenance : Mimetypes : Javascript"
containers.podman.podman_container_exec:
name: nextcloud
container: nextcloud
user: www-data
command: "./occ maintenance:mimetype:update-js"
register: task
@@ -1351,7 +1097,7 @@
- name: "Deployer - Nextcloud - Configure - System : Configure"
containers.podman.podman_container_exec:
name: nextcloud
container: nextcloud
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 }}"
vars:
@@ -1371,7 +1117,7 @@
- name: "Deployer - Nextcloud - Configure - Applications : Disable"
containers.podman.podman_container_exec:
name: nextcloud
container: nextcloud
user: www-data
command: "./occ app:disable {{ application.identifier }}"
vars:
@@ -1410,7 +1156,7 @@
- name: "Deployer - Nextcloud - Configure - Applications : Enable"
containers.podman.podman_container_exec:
name: nextcloud
container: nextcloud
user: www-data
command: "./occ app:enable {{ application.identifier }}"
vars:
@@ -1437,7 +1183,7 @@
- name: "Deployer - Nextcloud - Configure - Applications : Install"
containers.podman.podman_container_exec:
name: nextcloud
container: nextcloud
user: www-data
command: "./occ app:install {{ application.identifier }}"
vars:
@@ -1467,7 +1213,7 @@
- name: "Deployer - Nextcloud - Configure - Applications : Update"
containers.podman.podman_container_exec:
name: nextcloud
container: nextcloud
user: www-data
command: "./occ app:update --all"
register: task
@@ -1480,7 +1226,7 @@
- name: "Deployer - Nextcloud - Configure - Applications : Configure - OpenID Connect Login"
containers.podman.podman_container_exec:
name: nextcloud
container: nextcloud
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 }}"
vars:
@@ -1519,7 +1265,7 @@
- name: "Deployer - Nextcloud - Configure - Maintenance Mode : Disable"
containers.podman.podman_container_exec:
name: nextcloud
container: nextcloud
user: www-data
command: "./occ maintenance:mode --off"
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
register: task
changed_when:
- "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
register: task
changed_when:
- "task.stdout.find('0 upgraded, 0 newly installed, 0 to remove') == -1"
- name: "Installer : Python 3 : Configure - Virtual Environment : Test"
ansible.builtin.raw: "/opt/ansible/bin/pip3"
- name: "Init : Python 3 : Configure - Virtual Environment : Test"
ansible.builtin.raw: "/root/.venv/ansible/bin/pip3"
register: task632
changed_when: false
failed_when: false
- name: "Installer : Python 3 : Configure - Virtual Environment : Delete"
- name: "Init : Python 3 : Configure - Virtual Environment : Delete"
ansible.builtin.file:
path: "/opt/ansible"
path: "/root/.venv/ansible"
state: absent
when:
- "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:
name: pip
state: latest
extra_args: --upgrade
virtualenv: /opt/ansible
virtualenv: /root/.venv/ansible
virtualenv_command: "python3 -m venv"
- name: "Installer : Tools : Install"
@@ -103,27 +103,18 @@
- name: "Installer : FirewallD : Dependencies - Packages"
ansible.builtin.apt:
name: "{{ package }}"
state: latest
vars:
ansible_python_interpreter: /usr/bin/python3
packages:
name:
- python3-firewall
- iptables
loop: "{{ packages }}"
loop_control:
label: "{{ package }}"
loop_var: "package"
state: latest
tags:
- firewalld
- firewall
- name: "Installer : FirewallD : Install"
ansible.builtin.apt:
name: firewalld
name: "firewalld"
state: latest
vars:
ansible_python_interpreter: /usr/bin/python3
tags:
- firewalld
- firewall
@@ -145,7 +136,6 @@
immediate: true
offline: true
vars:
ansible_python_interpreter: /usr/bin/python3
services:
- http
- https
@@ -160,47 +150,12 @@
- firewalld
- 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"
ansible.builtin.pip:
name: ansible
state: latest
extra_args: --upgrade
virtualenv: /opt/ansible
virtualenv: /root/.venv/ansible
virtualenv_command: "python3 -m venv"
tags:
- ansible
@@ -214,7 +169,7 @@
- name: "Installer : Ansible : Create Symbolic Links"
ansible.builtin.file:
src: /opt/ansible/bin/{{ binary }}
src: /root/.venv/ansible/bin/{{ binary }}
dest: /root/bin/{{ binary }}
state: link
vars:
@@ -237,12 +192,34 @@
tags:
- 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"
ansible.builtin.pip:
name: pymysql
state: latest
extra_args: --upgrade
virtualenv: /opt/ansible
virtualenv: /root/.venv/ansible
virtualenv_command: "python3 -m venv"
tags:
- mariadb
@@ -250,46 +227,37 @@
- name: "Installer : MariaDB : Dependencies - Package : mariadb-client"
ansible.builtin.apt:
name: mariadb-client
name: "mariadb-client"
state: latest
vars:
ansible_python_interpreter: /usr/bin/python3
tags:
- mariadb
- database
- name: "Installer : Podman : Install"
ansible.builtin.apt:
name: "{{ package }}"
state: latest
vars:
ansible_python_interpreter: /usr/bin/python3
packages:
name:
- podman
- podman-compose
- netavark
- buildah
- slirp4netns
loop: "{{ packages }}"
loop_control:
label: "{{ package }}"
loop_var: "package"
state: latest
tags:
- podman
- name: "Installer : Schedule : Maintenance"
ansible.builtin.cron:
name: "Tietojärjestelmäasentajien Infra - Maintenance"
name: "{{ location | upper }} - 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"
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:
- cron
- name: "Installer : Schedule : Deployer"
ansible.builtin.cron:
name: "Tietojärjestelmäasentajien Infra - Deployer"
name: "{{ location | upper }} - Infra - Deployer"
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:
- cron

View File

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