diff --git a/.ansible-lint b/.ansible-lint index 4580f8d..8cb9eca 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -132,6 +132,9 @@ profile: null # ``` skip_list: - skip_this_tag + - command-instead-of-shell + - no-changed-when + - loop-var-prefix[missing] ### # Define required Ansible's variables to satisfy syntax check # extra_vars: diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 486ba44..e7c3db2 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -107,7 +107,7 @@ jobs: .sphinx/bin/pipenv install --dev .sphinx/bin/pipenv install --categories docs - name: Build artifact - run: .venv/bin/sphinx-build -a -E . deploy + run: .venv/bin/sphinx-build -a -b html -E . deploy - name: Upload artifact uses: actions/upload-pages-artifact@main with: diff --git a/.gitignore b/.gitignore index 649e792..0cf0cd6 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ node_modules package-lock.json package.json roles/reset/files/*.reset.md +roles/join/files/join.md +roles/init/files/admin.conf diff --git a/Pipfile b/Pipfile index 490aa60..953c7aa 100644 --- a/Pipfile +++ b/Pipfile @@ -12,8 +12,10 @@ gitpython = "*" loguru = "*" pipenv = "*" redis = "*" +sphinxcontrib-yaml = "*" [dev-packages] +ansible-lint = "*" molecule = "*" pytest = "*" pytest-cov = "*" diff --git a/Pipfile.lock b/Pipfile.lock index c6c3725..a0e8f50 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "dcc5828c7f0ace2107e89c3165308a987191ac98e3125f2169bb0443b0e176b3" + "sha256": "77272b068646e0b4662a1ab05e3c867986c074eb334afe99aec6c939ee19aebd" }, "pipfile-spec": 6, "requires": {}, @@ -14,6 +14,14 @@ ] }, "default": { + "alabaster": { + "hashes": [ + "sha256:75a8b99c28a5dad50dd7f8ccdd447a121ddb3892da9e53d1ca5cca3106d58d65", + "sha256:b46733c07dce03ae4e150330b975c75737fa60f0a7c591b6c8bf4928a28e2c92" + ], + "markers": "python_version >= '3.9'", + "version": "==0.7.16" + }, "ansible": { "hashes": [ "sha256:2e62fc3622a439d48bee0fdcbd984ad34bdf50b47cb2dc0258f4baf61bad6ce2", @@ -90,6 +98,14 @@ "markers": "python_version >= '3.7'", "version": "==23.2.0" }, + "babel": { + "hashes": [ + "sha256:08706bdad8d0a3413266ab61bd6c34d0c28d6e1e7badf40a2cebe67644e2e1fb", + "sha256:8daf0e265d05768bc6c7a314cf1321e9a123afc328cc635c18622a2f30a04413" + ], + "markers": "python_version >= '3.8'", + "version": "==2.15.0" + }, "bindep": { "hashes": [ "sha256:6abe2f721e5388b518affb8bf8c8945977e75e88803e229799b3599a6da32b01", @@ -199,6 +215,102 @@ "markers": "python_version >= '3.8'", "version": "==1.16.0" }, + "charset-normalizer": { + "hashes": [ + "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027", + "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087", + "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786", + "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8", + "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09", + "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185", + "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574", + "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e", + "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519", + "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898", + "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269", + "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3", + "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f", + "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6", + "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8", + "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a", + "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73", + "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc", + "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714", + "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2", + "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc", + "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce", + "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d", + "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e", + "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6", + "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269", + "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96", + "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d", + "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a", + "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4", + "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77", + "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d", + "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0", + "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed", + "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068", + "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac", + "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25", + "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8", + "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab", + "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26", + "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2", + "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db", + "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f", + "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5", + "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99", + "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c", + "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d", + "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811", + "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa", + "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a", + "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03", + "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b", + "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04", + "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c", + "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001", + "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458", + "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389", + "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99", + "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985", + "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537", + "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238", + "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f", + "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d", + "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796", + "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a", + "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143", + "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8", + "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c", + "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5", + "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5", + "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711", + "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4", + "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6", + "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c", + "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7", + "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4", + "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b", + "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae", + "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12", + "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c", + "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae", + "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8", + "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887", + "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b", + "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4", + "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f", + "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5", + "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33", + "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519", + "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561" + ], + "markers": "python_full_version >= '3.7.0'", + "version": "==3.3.2" + }, "click": { "hashes": [ "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28", @@ -288,6 +400,22 @@ "markers": "python_version >= '3.7'", "version": "==3.1.43" }, + "idna": { + "hashes": [ + "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc", + "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0" + ], + "markers": "python_version >= '3.5'", + "version": "==3.7" + }, + "imagesize": { + "hashes": [ + "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b", + "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==1.4.1" + }, "importlib-metadata": { "hashes": [ "sha256:3cd29f739ed65973840b068e3132135ce954c254d48b5b640484467ef7ab3c8c", @@ -601,6 +729,14 @@ "markers": "python_version >= '3.8'", "version": "==0.35.1" }, + "requests": { + "hashes": [ + "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760", + "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6" + ], + "markers": "python_version >= '3.8'", + "version": "==2.32.3" + }, "resolvelib": { "hashes": [ "sha256:04ce76cbd63fded2078ce224785da6ecd42b9564b1390793f64ddecbe997b309", @@ -790,7 +926,7 @@ "sha256:032d42ee9fb536e33087fb66cac5f840eb9391ed05637b3f2a76a7c8fb477936", "sha256:33874fdc59b3188304b2e7c80d9029097ea31627180896fb549c578ceb8a0855" ], - "markers": "python_version >= '3.8'", + "markers": "python_version >= '3.11'", "version": "==71.1.0" }, "smmap": { @@ -801,6 +937,76 @@ "markers": "python_version >= '3.7'", "version": "==5.0.1" }, + "snowballstemmer": { + "hashes": [ + "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1", + "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a" + ], + "version": "==2.2.0" + }, + "sphinx": { + "hashes": [ + "sha256:242f92a7ea7e6c5b406fdc2615413890ba9f699114a9c09192d7dfead2ee9cfe", + "sha256:c2419e2135d11f1951cd994d6eb18a1835bd8fdd8429f9ca375dc1f3281bd239" + ], + "markers": "python_version >= '3.9'", + "version": "==7.4.7" + }, + "sphinxcontrib-applehelp": { + "hashes": [ + "sha256:c40a4f96f3776c4393d933412053962fac2b84f4c99a7982ba42e09576a70619", + "sha256:cb61eb0ec1b61f349e5cc36b2028e9e7ca765be05e49641c97241274753067b4" + ], + "markers": "python_version >= '3.9'", + "version": "==1.0.8" + }, + "sphinxcontrib-devhelp": { + "hashes": [ + "sha256:6485d09629944511c893fa11355bda18b742b83a2b181f9a009f7e500595c90f", + "sha256:9893fd3f90506bc4b97bdb977ceb8fbd823989f4316b28c3841ec128544372d3" + ], + "markers": "python_version >= '3.9'", + "version": "==1.0.6" + }, + "sphinxcontrib-htmlhelp": { + "hashes": [ + "sha256:1b9af5a2671a61410a868fce050cab7ca393c218e6205cbc7f590136f207395c", + "sha256:c6597da06185f0e3b4dc952777a04200611ef563882e0c244d27a15ee22afa73" + ], + "markers": "python_version >= '3.9'", + "version": "==2.0.6" + }, + "sphinxcontrib-jsmath": { + "hashes": [ + "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178", + "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8" + ], + "markers": "python_version >= '3.5'", + "version": "==1.0.1" + }, + "sphinxcontrib-qthelp": { + "hashes": [ + "sha256:323d6acc4189af76dfe94edd2a27d458902319b60fcca2aeef3b2180c106a75f", + "sha256:db3f8fa10789c7a8e76d173c23364bdf0ebcd9449969a9e6a3dd31b8b7469f03" + ], + "markers": "python_version >= '3.9'", + "version": "==1.0.8" + }, + "sphinxcontrib-serializinghtml": { + "hashes": [ + "sha256:326369b8df80a7d2d8d7f99aa5ac577f51ea51556ed974e7716cfd4fca3f6cb7", + "sha256:93f3f5dc458b91b192fe10c397e324f262cf163d79f3282c158e8436a2c4511f" + ], + "markers": "python_version >= '3.9'", + "version": "==1.1.10" + }, + "sphinxcontrib-yaml": { + "hashes": [ + "sha256:e3c2785a9bdb68ff544b3881247258ac66bc7c15a94844afff998ec9ef65efba" + ], + "index": "pypi", + "version": "==1.0.0" + }, "subprocess-tee": { "hashes": [ "sha256:21942e976715af4a19a526918adb03a8a27a8edab959f2d075b777e3d78f532d", @@ -817,6 +1023,14 @@ "markers": "python_version >= '2'", "version": "==2024.1" }, + "urllib3": { + "hashes": [ + "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472", + "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168" + ], + "markers": "python_version >= '3.8'", + "version": "==2.2.2" + }, "virtualenv": { "hashes": [ "sha256:4c43a2a236279d9ea36a0d76f98d84bd6ca94ac4e0f4a3b9d46d05e10fea542a", @@ -867,6 +1081,15 @@ "markers": "python_version >= '3.10'", "version": "==2.17.2" }, + "ansible-lint": { + "hashes": [ + "sha256:a2305f1d69a25be27810c64a32711d1d0463d2fda5b9308166362347aeda36e0", + "sha256:ca2edc7e4e80cf19df4b28cbf4c118f761ce6cdd6a5ef9c8561e454ed7af5a24" + ], + "index": "pypi", + "markers": "python_version >= '3.10'", + "version": "==24.7.0" + }, "argcomplete": { "hashes": [ "sha256:69a79e083a716173e5532e0fa3bef45f793f4e61096cf52b5a42c0211c8b8aa5", @@ -882,6 +1105,34 @@ "markers": "python_version >= '3.7'", "version": "==23.2.0" }, + "black": { + "hashes": [ + "sha256:257d724c2c9b1660f353b36c802ccece186a30accc7742c176d29c146df6e474", + "sha256:37aae07b029fa0174d39daf02748b379399b909652a806e5708199bd93899da1", + "sha256:415e686e87dbbe6f4cd5ef0fbf764af7b89f9057b97c908742b6008cc554b9c0", + "sha256:48a85f2cb5e6799a9ef05347b476cce6c182d6c71ee36925a6c194d074336ef8", + "sha256:7768a0dbf16a39aa5e9a3ded568bb545c8c2727396d063bbaf847df05b08cd96", + "sha256:7e122b1c4fb252fd85df3ca93578732b4749d9be076593076ef4d07a0233c3e1", + "sha256:88c57dc656038f1ab9f92b3eb5335ee9b021412feaa46330d5eba4e51fe49b04", + "sha256:8e537d281831ad0e71007dcdcbe50a71470b978c453fa41ce77186bbe0ed6021", + "sha256:98e123f1d5cfd42f886624d84464f7756f60ff6eab89ae845210631714f6db94", + "sha256:accf49e151c8ed2c0cdc528691838afd217c50412534e876a19270fea1e28e2d", + "sha256:b1530ae42e9d6d5b670a34db49a94115a64596bc77710b1d05e9801e62ca0a7c", + "sha256:b9176b9832e84308818a99a561e90aa479e73c523b3f77afd07913380ae2eab7", + "sha256:bdde6f877a18f24844e381d45e9947a49e97933573ac9d4345399be37621e26c", + "sha256:be8bef99eb46d5021bf053114442914baeb3649a89dc5f3a555c88737e5e98fc", + "sha256:bf10f7310db693bb62692609b397e8d67257c55f949abde4c67f9cc574492cc7", + "sha256:c872b53057f000085da66a19c55d68f6f8ddcac2642392ad3a355878406fbd4d", + "sha256:d36ed1124bb81b32f8614555b34cc4259c3fbc7eec17870e8ff8ded335b58d8c", + "sha256:da33a1a5e49c4122ccdfd56cd021ff1ebc4a1ec4e2d01594fef9b6f267a9e741", + "sha256:dd1b5a14e417189db4c7b64a6540f31730713d173f0b63e55fabd52d61d8fdce", + "sha256:e151054aa00bad1f4e1f04919542885f89f5f7d086b8a59e5000e6c616896ffb", + "sha256:eaea3008c281f1038edb473c1aa8ed8143a5535ff18f978a318f10302b254063", + "sha256:ef703f83fc32e131e9bcc0a5094cfe85599e7109f896fe8bc96cc402f3eb4b6e" + ], + "markers": "python_version >= '3.8'", + "version": "==24.4.2" + }, "boilerplates": { "extras": [ "cli", @@ -1084,6 +1335,14 @@ "markers": "python_version >= '3.6'", "version": "==1.2.7" }, + "filelock": { + "hashes": [ + "sha256:2207938cbc1844345cb01a5a95524dae30f0ce089eba5b00378295a17e3e90cb", + "sha256:6ca1fffae96225dab4c6eaf1c4f4f28cd2568d3ec2a44e15a08520504de468e7" + ], + "markers": "python_version >= '3.8'", + "version": "==3.15.4" + }, "gitdb": { "hashes": [ "sha256:81a3407ddd2ee8df444cbacea00e2d038e40150acfa3001696fe0dcf1d3adfa4", @@ -1101,6 +1360,14 @@ "markers": "python_version >= '3.7'", "version": "==3.1.43" }, + "importlib-metadata": { + "hashes": [ + "sha256:3cd29f739ed65973840b068e3132135ce954c254d48b5b640484467ef7ab3c8c", + "sha256:fcdcb1d5ead7bdf3dd32657bb94ebe9d2aabfe89a19782ddc32da5041d6ebfb4" + ], + "markers": "python_version >= '3.8'", + "version": "==8.1.0" + }, "iniconfig": { "hashes": [ "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3", @@ -1224,6 +1491,14 @@ "markers": "python_version >= '3.10'", "version": "==24.7.0" }, + "mypy-extensions": { + "hashes": [ + "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d", + "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782" + ], + "markers": "python_version >= '3.5'", + "version": "==1.0.0" + }, "packaging": { "hashes": [ "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002", @@ -1232,6 +1507,22 @@ "markers": "python_version >= '3.8'", "version": "==24.1" }, + "pathspec": { + "hashes": [ + "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08", + "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" + ], + "markers": "python_version >= '3.8'", + "version": "==0.12.1" + }, + "platformdirs": { + "hashes": [ + "sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee", + "sha256:38b7b51f512eed9e84a22788b4bce1de17c0adb134d6becb09836e37d8654cd3" + ], + "markers": "python_version >= '3.8'", + "version": "==4.2.2" + }, "pluggy": { "hashes": [ "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1", @@ -1459,6 +1750,70 @@ "markers": "python_version >= '3.8'", "version": "==0.19.0" }, + "ruamel.yaml": { + "hashes": [ + "sha256:57b53ba33def16c4f3d807c0ccbc00f8a6081827e81ba2491691b76882d0c636", + "sha256:8b27e6a217e786c6fbe5634d8f3f11bc63e0f80f6a5890f28863d9c45aac311b" + ], + "markers": "python_version >= '3.7'", + "version": "==0.18.6" + }, + "ruamel.yaml.clib": { + "hashes": [ + "sha256:024cfe1fc7c7f4e1aff4a81e718109e13409767e4f871443cbff3dba3578203d", + "sha256:03d1162b6d1df1caa3a4bd27aa51ce17c9afc2046c31b0ad60a0a96ec22f8001", + "sha256:07238db9cbdf8fc1e9de2489a4f68474e70dffcb32232db7c08fa61ca0c7c462", + "sha256:09b055c05697b38ecacb7ac50bdab2240bfca1a0c4872b0fd309bb07dc9aa3a9", + "sha256:1707814f0d9791df063f8c19bb51b0d1278b8e9a2353abbb676c2f685dee6afe", + "sha256:1758ce7d8e1a29d23de54a16ae867abd370f01b5a69e1a3ba75223eaa3ca1a1b", + "sha256:184565012b60405d93838167f425713180b949e9d8dd0bbc7b49f074407c5a8b", + "sha256:1b617618914cb00bf5c34d4357c37aa15183fa229b24767259657746c9077615", + "sha256:1dc67314e7e1086c9fdf2680b7b6c2be1c0d8e3a8279f2e993ca2a7545fecf62", + "sha256:25ac8c08322002b06fa1d49d1646181f0b2c72f5cbc15a85e80b4c30a544bb15", + "sha256:25c515e350e5b739842fc3228d662413ef28f295791af5e5110b543cf0b57d9b", + "sha256:305889baa4043a09e5b76f8e2a51d4ffba44259f6b4c72dec8ca56207d9c6fe1", + "sha256:3213ece08ea033eb159ac52ae052a4899b56ecc124bb80020d9bbceeb50258e9", + "sha256:3f215c5daf6a9d7bbed4a0a4f760f3113b10e82ff4c5c44bec20a68c8014f675", + "sha256:46d378daaac94f454b3a0e3d8d78cafd78a026b1d71443f4966c696b48a6d899", + "sha256:4ecbf9c3e19f9562c7fdd462e8d18dd902a47ca046a2e64dba80699f0b6c09b7", + "sha256:53a300ed9cea38cf5a2a9b069058137c2ca1ce658a874b79baceb8f892f915a7", + "sha256:56f4252222c067b4ce51ae12cbac231bce32aee1d33fbfc9d17e5b8d6966c312", + "sha256:5c365d91c88390c8d0a8545df0b5857172824b1c604e867161e6b3d59a827eaa", + "sha256:700e4ebb569e59e16a976857c8798aee258dceac7c7d6b50cab63e080058df91", + "sha256:75e1ed13e1f9de23c5607fe6bd1aeaae21e523b32d83bb33918245361e9cc51b", + "sha256:77159f5d5b5c14f7c34073862a6b7d34944075d9f93e681638f6d753606c6ce6", + "sha256:7f67a1ee819dc4562d444bbafb135832b0b909f81cc90f7aa00260968c9ca1b3", + "sha256:840f0c7f194986a63d2c2465ca63af8ccbbc90ab1c6001b1978f05119b5e7334", + "sha256:84b554931e932c46f94ab306913ad7e11bba988104c5cff26d90d03f68258cd5", + "sha256:87ea5ff66d8064301a154b3933ae406b0863402a799b16e4a1d24d9fbbcbe0d3", + "sha256:955eae71ac26c1ab35924203fda6220f84dce57d6d7884f189743e2abe3a9fbe", + "sha256:a1a45e0bb052edf6a1d3a93baef85319733a888363938e1fc9924cb00c8df24c", + "sha256:a5aa27bad2bb83670b71683aae140a1f52b0857a2deff56ad3f6c13a017a26ed", + "sha256:a6a9ffd280b71ad062eae53ac1659ad86a17f59a0fdc7699fd9be40525153337", + "sha256:a75879bacf2c987c003368cf14bed0ffe99e8e85acfa6c0bfffc21a090f16880", + "sha256:aa2267c6a303eb483de8d02db2871afb5c5fc15618d894300b88958f729ad74f", + "sha256:aab7fd643f71d7946f2ee58cc88c9b7bfc97debd71dcc93e03e2d174628e7e2d", + "sha256:b16420e621d26fdfa949a8b4b47ade8810c56002f5389970db4ddda51dbff248", + "sha256:b42169467c42b692c19cf539c38d4602069d8c1505e97b86387fcf7afb766e1d", + "sha256:bba64af9fa9cebe325a62fa398760f5c7206b215201b0ec825005f1b18b9bccf", + "sha256:beb2e0404003de9a4cab9753a8805a8fe9320ee6673136ed7f04255fe60bb512", + "sha256:bef08cd86169d9eafb3ccb0a39edb11d8e25f3dae2b28f5c52fd997521133069", + "sha256:c2a72e9109ea74e511e29032f3b670835f8a59bbdc9ce692c5b4ed91ccf1eedb", + "sha256:c58ecd827313af6864893e7af0a3bb85fd529f862b6adbefe14643947cfe2942", + "sha256:c69212f63169ec1cfc9bb44723bf2917cbbd8f6191a00ef3410f5a7fe300722d", + "sha256:cabddb8d8ead485e255fe80429f833172b4cadf99274db39abc080e068cbcc31", + "sha256:d176b57452ab5b7028ac47e7b3cf644bcfdc8cacfecf7e71759f7f51a59e5c92", + "sha256:da09ad1c359a728e112d60116f626cc9f29730ff3e0e7db72b9a2dbc2e4beed5", + "sha256:e2b4c44b60eadec492926a7270abb100ef9f72798e18743939bdbf037aab8c28", + "sha256:e79e5db08739731b0ce4850bed599235d601701d5694c36570a99a0c5ca41a9d", + "sha256:ebc06178e8821efc9692ea7544aa5644217358490145629914d8020042c24aa1", + "sha256:edaef1c1200c4b4cb914583150dcaa3bc30e592e907c01117c08b13a07255ec2", + "sha256:f481f16baec5290e45aebdc2a5168ebc6d35189ae6fea7a58787613a25f6e875", + "sha256:fff3573c2db359f091e1589c3d7c5fc2f86f5bdb6f24252c2d8e539d4e45f412" + ], + "markers": "python_version < '3.13' and platform_python_implementation == 'CPython'", + "version": "==0.2.8" + }, "semver": { "hashes": [ "sha256:6253adb39c70f6e51afed2fa7152bcd414c411286088fb4b9effb133885ab4cc", @@ -1499,6 +1854,22 @@ ], "markers": "python_version >= '3.12'", "version": "==8.5.2" + }, + "yamllint": { + "hashes": [ + "sha256:2e16e504bb129ff515b37823b472750b36b6de07963bd74b307341ef5ad8bdc3", + "sha256:7a003809f88324fd2c877734f2d575ee7881dd9043360657cc8049c809eba6cd" + ], + "markers": "python_version >= '3.8'", + "version": "==1.35.1" + }, + "zipp": { + "hashes": [ + "sha256:bf1dcf6450f873a13e952a29504887c89e6de7506209e5b1bcc3460135d4de19", + "sha256:f091755f667055f2d02b32c53771a7a6c8b47e1fdbc4b72a8b9072b3eef8015c" + ], + "markers": "python_version >= '3.8'", + "version": "==3.19.2" } }, "docs": { @@ -1929,7 +2300,7 @@ "sha256:032d42ee9fb536e33087fb66cac5f840eb9391ed05637b3f2a76a7c8fb477936", "sha256:33874fdc59b3188304b2e7c80d9029097ea31627180896fb549c578ceb8a0855" ], - "markers": "python_version >= '3.8'", + "markers": "python_version >= '3.11'", "version": "==71.1.0" }, "six": { @@ -2086,12 +2457,12 @@ }, "sphinxcontrib-autoyaml": { "hashes": [ - "sha256:13956ba807b31189a4d0a459d762245c2e08d1d5e070a960082e9d3ce216ee54", - "sha256:d4cd04a248742d760d44371419fa3375eff041007fcfdce5907a831ba509110b" + "sha256:117de410bbbae0fd85d28b25c92880e1a18a84afe76c9766c92432253095ba39", + "sha256:dc87ade28d7c5a6e34ccff0d76e99a07c675679b5f2895a68d0dbd0d68e607c9" ], "index": "pypi", "markers": "python_version >= '3.6' and python_version < '4.0'", - "version": "==0.5.0" + "version": "==1.1.1" }, "sphinxcontrib-devhelp": { "hashes": [ diff --git a/cicd.md b/cicd.md index f8695d3..8ff22c8 100644 --- a/cicd.md +++ b/cicd.md @@ -14,7 +14,8 @@ title: CI/CD Stay away from zero days with Dependabot. -```{autoyaml} .github/dependabot.yml +```{literalinclude} /.github/dependabot.yml +:language: yaml ``` ## Workflows @@ -26,21 +27,24 @@ run a lot of pipelines for free. The CodeQL workflow provided by GitHub is actually pretty good also. -```{autoyaml} .github/workflows/codeql.yml +```{literalinclude} .github/workflows/codeql.yml +:language: yaml ``` ### pages Build and deploy the GitHub Pages docs. -```{autoyaml} .github/workflows/pages.yml +```{literalinclude} .github/workflows/pages.yml +:language: yaml ``` ### shell And ShellCheck never hurt anybody either. -```{autoyaml} .github/workflows/shell.yml +```{literalinclude} .github/workflows/shell.yml +:language: yaml ``` ## Lint @@ -49,5 +53,6 @@ This is the configuration for the various lint tools used here. ### ansible-lint -```{autoyaml} .ansible-lint +```{literalinclude} .ansible-lint +:language: yaml ``` diff --git a/conf.py b/conf.py index 76310d9..21bb8f3 100644 --- a/conf.py +++ b/conf.py @@ -31,10 +31,10 @@ def get_version(): exclude_patterns = [ "_build", "Thumbs.db", + 'roles/join/files/join.md', ".DS_Store", ".pytest_cache/*", ".tox/*", - 'roles/reset/files/kcp01.breeze-blocks.net.reset.md/kcp01.breeze-blocks.net/root/reset.md', ".venv/*", ] extensions = [ diff --git a/index.md b/index.md index bbbf32d..9709671 100644 --- a/index.md +++ b/index.md @@ -18,7 +18,7 @@ title: Ansible Bare Metal K8S ```{rubric} site.yml ``` -```{autoyaml} ./site.yml +```{literalinclude} ./site.yml ``` ### Roles diff --git a/roles/init/files/reset.yaml b/roles/init/files/reset.yaml deleted file mode 100644 index 8e4cbbd..0000000 --- a/roles/init/files/reset.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: kubeadm.k8s.io/v1beta4 -certificatesDir: /etc/kubernetes/pki -criSocket: unix:///var/run/containerd/containerd.sock -kind: ResetConfiguration -timeouts: - controlPlaneComponentHealthCheck: 4m0s - discovery: 5m0s - etcdAPICall: 2m0s - kubeletHealthCheck: 4m0s - kubernetesAPICall: 1m0s - tlsBootstrap: 5m0s - upgradeManifests: 5m0s diff --git a/roles/init/index.md b/roles/init/index.md index 079a9be..d1878a0 100644 --- a/roles/init/index.md +++ b/roles/init/index.md @@ -18,3 +18,12 @@ More information about the process for HA setup is available A handy tool for switching k8s contexts is called [kubie](https://github.com/sbstp/kubie). + +## Tasks + +```{literalinclude} /roles/init/tasks/main.yml +:language: yaml +``` + +```{sectionauthor} Xander Harris +``` diff --git a/roles/init/tasks/main.yml b/roles/init/tasks/main.yml index 5d647ca..9f4d15a 100644 --- a/roles/init/tasks/main.yml +++ b/roles/init/tasks/main.yml @@ -1,4 +1,15 @@ --- + ### + # ```{rubric} Prep for Kubeadm + # ``` + # --- + # Prepare the first control plane for init. + # + # ```{literalinclude} /roles/init/tasks/main.yml + # :language: yaml + # :start-at: "- name: Create kube group\n" + # :end-at: " mode: ugo+rw\n" + # ``` - name: Create kube group ansible.builtin.group: name: kube @@ -20,13 +31,9 @@ ansible.builtin.file: dest: /etc/kubeadm/init.token state: absent - -- name: Reset existing cluster +- name: Generate a boostrap token ansible.builtin.shell: - chdir: /etc/kubeadm - cmd: >- - kubeadm token generate > init.token && cat init.token - creates: /etc/kubeadm/init.token + cmd: kubeadm token generate register: token_out - name: Template token init config ansible.builtin.template: @@ -35,12 +42,44 @@ owner: kube group: kube mode: ugo+rw -# - name: Init new cluster -# ansible.builtin.command: -# chdir: /etc/kubeadm -# cmd: kubeadm init --config init.yaml -# creates: /etc/kubernetes/admin.conf -# register: init_result -# - name: Debug -# ansible.builtin.debug: -# var: init_result + ### + # ```{rubric} Init 1 + # ``` + # --- + # Run the command to initialize the first control plane. + # + # ```{literalinclude} /roles/init/tasks/main.yml + # :language: yaml + # :start-at: "- name: Init new cluster\n" + # ``` +- name: Init new cluster + ansible.builtin.shell: + chdir: /etc/kubeadm + cmd: kubeadm init --config init.yaml --upload-certs &> /root/join.md + creates: /etc/kubernetes/admin.conf + register: init_result +- name: Debug + ansible.builtin.debug: + var: init_result +- name: Pull stored output from host + ansible.builtin.fetch: + src: /root/join.md + dest: roles/join/files/ + flat: true +- name: Pull admin conf from remote + ansible.builtin.fetch: + src: /etc/kubernetes/admin.conf + dest: roles/init/files/ + flat: true +- name: Copy admin conf back to remote + ansible.builtin.copy: + src: roles/init/files/admin.conf + dest: "{{ item.path }}" + owner: "{{ item.owner }}" + group: kube + mode: u+rw,go-rwx + loop: + - path: /root/.kube/config + owner: root + - path: "/home/{{ kcp_nonroot }}/.kube/config" + owner: "{{ kcp_nonroot }}" diff --git a/roles/init/templates/init.yaml b/roles/init/templates/init.yaml index 0f65a30..e585866 100644 --- a/roles/init/templates/init.yaml +++ b/roles/init/templates/init.yaml @@ -26,9 +26,9 @@ clusterName: breeze-blocks controllerManager: {} controlPlaneEndpoint: {{ kcp_aa }} dns: {} -etcd: - local: - dataDir: /var/lib/etcd +# etcd: +# local: +# dataDir: /var/lib/etcd imageRepository: registry.k8s.io kind: ClusterConfiguration kubernetesVersion: 1.30.0 diff --git a/roles/init/templates/join.yaml b/roles/init/templates/join.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/roles/join/tasks/main.yml b/roles/join/tasks/main.yml new file mode 100644 index 0000000..c27cdf8 --- /dev/null +++ b/roles/join/tasks/main.yml @@ -0,0 +1,4 @@ +--- +- name: Output nothing + ansible.builtin.debug: + msg: "nothing here" diff --git a/roles/reset/index.md b/roles/reset/index.md index 2977ea6..5b36e7c 100644 --- a/roles/reset/index.md +++ b/roles/reset/index.md @@ -9,7 +9,8 @@ title: Reset Cluster ## Reset Role Usage -```{autoyaml} roles/reset/tasks/main.yml +```{literalinclude} /roles/reset/tasks/main.yml +:language: yaml ``` ```{index} role; reset diff --git a/roles/reset/tasks/main.yml b/roles/reset/tasks/main.yml index 9d9120f..c3e5ea8 100644 --- a/roles/reset/tasks/main.yml +++ b/roles/reset/tasks/main.yml @@ -29,7 +29,7 @@ - name: Show output ansible.builtin.debug: var: reset_out -- name: Pull stored output from hosts - ansible.builtin.fetch: - src: /root/reset.md - dest: "roles/reset/files/{{ inventory_hostname }}.reset.md" +- name: Drop reset output + ansible.builtin.file: + dest: /root/reset.md + state: absent diff --git a/site.yml b/site.yml index 29ea544..c549ec9 100644 --- a/site.yml +++ b/site.yml @@ -4,6 +4,10 @@ # ``` # --- # This playbook defines the primary site deployment code for this repository. +# +# ```{literalinclude} /site.yml +# :language: yaml +# ``` - name: Reset Kubernetes Control Planes hosts: kcp become: true @@ -11,3 +15,10 @@ - role: reset tags: - reset +- name: Initialize the first control plane + hosts: kcp01 + become: true + roles: + - role: init + tags: + - init