diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 3370c3f0..a904214c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -23,9 +23,22 @@ A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - All relevant software versions [e.g. ansible 2.9.7] +**Target (please complete the following information):** + - OS: [e.g. Ubuntu] + - Ansible version: + - `artis3n.tailscale` version: + - Tailscale version (set `verbose` to true): + +Output of `tailscale status` during role execution (set `verbose` to true): + +```bash +ok: [instance] => { + "tailscale_status": { + ... + } + } + +``` **Additional context** Add any other context about the problem here. diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 732675a7..26fba2fc 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,9 +4,9 @@ updates: - package-ecosystem: "github-actions" directory: "/" schedule: - interval: "daily" + interval: "weekly" - package-ecosystem: "pip" directory: "/" schedule: - interval: "daily" + interval: "monthly" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9a17800..d84bb4c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: - geerlingguy/docker-debian10-ansible:latest - geerlingguy/docker-debian9-ansible:latest - geerlingguy/docker-fedora31-ansible:latest - - artis3n/docker-arch-ansible:latest + - ghcr.io/artis3n/docker-arch-ansible:latest fail-fast: false steps: diff --git a/Pipfile.lock b/Pipfile.lock index 9275a584..ae51c3f7 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -18,16 +18,17 @@ "default": { "ansible": { "hashes": [ - "sha256:75708c67e2ac926cea42856af72cbc9494bf8008197652f9609089f7b4c2515a" + "sha256:eb1d08b9b98a60e90e7123a12f40770780f29f9d73168da55d449106a9f4d348" ], "index": "pypi", - "version": "==2.10.1" + "version": "==2.10.3" }, "ansible-base": { "hashes": [ - "sha256:c79fe108e13b286bad21734208624aaef9dabb49bb4211b13bc96d88829e22ab" + "sha256:35a208726b10fecbcf00c263ae4572b48f505b5796fb77a85c3e9c1036ea5e4f" ], - "version": "==2.10.2" + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==2.10.3" }, "cffi": { "hashes": [ @@ -95,6 +96,7 @@ "sha256:d3d5e10be0cf2a12214ddee45c6bd203dab435e3d83b4560c03066eda600bfe3", "sha256:efe15aca4f64f3a7ea0c09c87826490e50ed166ce67368a68f315ea0807a20df" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==3.2.1" }, "jinja2": { @@ -102,6 +104,7 @@ "sha256:89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0", "sha256:f0a4641d3cf955324a89c04f3d94663aa4d638abe8f733ecd3582848e1c37035" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==2.11.2" }, "markupsafe": { @@ -140,6 +143,7 @@ "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7", "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.1.1" }, "packaging": { @@ -147,6 +151,7 @@ "sha256:4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8", "sha256:998416ba6962ae7fbd6596850b80e17859a5753ba17c32284f67bfff33784181" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==20.4" }, "pycparser": { @@ -154,6 +159,7 @@ "sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0", "sha256:7582ad22678f0fcd81102833f60ef8d0e57288b6b5fb00323d101be910e35705" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.20" }, "pyparsing": { @@ -161,6 +167,7 @@ "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1", "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b" ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.4.7" }, "pyyaml": { @@ -184,30 +191,32 @@ "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.15.0" } }, "develop": { "ansible": { "hashes": [ - "sha256:75708c67e2ac926cea42856af72cbc9494bf8008197652f9609089f7b4c2515a" + "sha256:eb1d08b9b98a60e90e7123a12f40770780f29f9d73168da55d449106a9f4d348" ], "index": "pypi", - "version": "==2.10.1" + "version": "==2.10.3" }, "ansible-base": { "hashes": [ - "sha256:c79fe108e13b286bad21734208624aaef9dabb49bb4211b13bc96d88829e22ab" + "sha256:35a208726b10fecbcf00c263ae4572b48f505b5796fb77a85c3e9c1036ea5e4f" ], - "version": "==2.10.2" + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==2.10.3" }, "ansible-lint": { "hashes": [ - "sha256:3844a424fcfae4b4a2e56c91f1b5870170c14d2a7c5807d987f785d699e9c48c", - "sha256:888cf2510d830de017e01ca4d5fd92abfb84458a2b2a47263a2d923a7dabc7ba" + "sha256:1012fc3f5c4c0c58eece515860f19c34c5088faa5be412eec6fae5b45bda9c4f", + "sha256:300e841f690b556a08d44902d6414283dc101079b27909e3a892f1cf1d10d7ff" ], "index": "pypi", - "version": "==4.3.6" + "version": "==4.3.7" }, "appdirs": { "hashes": [ @@ -221,6 +230,7 @@ "sha256:e098abbd9af3665aea81bdd6c869e93af4feb078e98468dd351c383af187aac5", "sha256:ff08d10cda1d36c68657d6ad20d74fbea493d980f8b2d45344e00d6ed2bf6ed4" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==0.17.0" }, "bcrypt": { @@ -233,6 +243,7 @@ "sha256:cd1ea2ff3038509ea95f687256c46b79f5fc382ad0aa3664d200047546d511d1", "sha256:cdcdcb3972027f83fe24a48b1e90ea4b584d35f1cc279d76de6fc4b13376239d" ], + "markers": "python_version >= '3.6'", "version": "==3.2.0" }, "binaryornot": { @@ -246,6 +257,7 @@ "hashes": [ "sha256:302e6694f206dd85cb63f13fd5025b31ab6d38c99c50c6d769f8fa0b0f299589" ], + "markers": "python_version >= '2.7'", "version": "==1.3.2" }, "certifi": { @@ -301,6 +313,7 @@ "sha256:32e43d604bbe7896fe7c248a9c2276447dbef840feb28fe20494f62af110211d", "sha256:cf22deb93d4bcf92f345a5c3cd39d3d41d6340adc60c78bbbd6588c384fda6a1" ], + "markers": "python_full_version >= '3.6.1'", "version": "==3.2.0" }, "chardet": { @@ -315,6 +328,7 @@ "sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a", "sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==7.1.2" }, "click-completion": { @@ -335,6 +349,7 @@ "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b", "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==0.4.4" }, "commonmark": { @@ -349,6 +364,7 @@ "sha256:430eb882d028afb6102c084bab6cf41f6559a77ce9b18dc6802e3bc0cc5f4a30", "sha256:efb6b2d4780feda8908a873e38f0e61778c23f6a2ea58215723bcceb5b515dac" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==1.7.2" }, "cryptography": { @@ -376,6 +392,7 @@ "sha256:d3d5e10be0cf2a12214ddee45c6bd203dab435e3d83b4560c03066eda600bfe3", "sha256:efe15aca4f64f3a7ea0c09c87826490e50ed166ce67368a68f315ea0807a20df" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==3.2.1" }, "distlib": { @@ -400,13 +417,6 @@ "index": "pypi", "version": "==4.3.1" }, - "fasteners": { - "hashes": [ - "sha256:007e4d2b2d4a10093f67e932e5166722d2eab83b77724156e92ad013c6226574", - "sha256:3a176da6b70df9bb88498e1a18a9e4a8579ed5b9141207762368a1017bf8f5ef" - ], - "version": "==0.15" - }, "filelock": { "hashes": [ "sha256:18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59", @@ -416,16 +426,18 @@ }, "identify": { "hashes": [ - "sha256:3139bf72d81dfd785b0a464e2776bd59bdc725b4cc10e6cf46b56a0db931c82e", - "sha256:969d844b7a85d32a5f9ac4e163df6e846d73c87c8b75847494ee8f4bd2186421" + "sha256:5dd84ac64a9a115b8e0b27d1756b244b882ad264c3c423f42af8235a6e71ca12", + "sha256:c9504ba6a043ee2db0a9d69e43246bc138034895f6338d5aed1b41e4a73b1513" ], - "version": "==1.5.6" + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==1.5.9" }, "idna": { "hashes": [ "sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6", "sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.10" }, "jinja2": { @@ -433,6 +445,7 @@ "sha256:89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0", "sha256:f0a4641d3cf955324a89c04f3d94663aa4d638abe8f733ecd3582848e1c37035" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==2.11.2" }, "jinja2-time": { @@ -478,6 +491,7 @@ "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7", "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.1.1" }, "molecule": { @@ -485,18 +499,18 @@ "docker" ], "hashes": [ - "sha256:29137de659d45ecdef28d107c0dc7e85ab3d5e37d5d17813430a7cc15be5b02e", - "sha256:b4f556495a0b8955ca4ac2f86b9a675b26b6adcba93206efd325a5b61d90548f" + "sha256:608252d8aab17ae3554d1c51e077ea2f82e7c50d7db13669bb2f24302ce66c68", + "sha256:99a8a406005a481910548f61d18defa5f826a78e3b3ec77d16c3be0f6c3e702b" ], "index": "pypi", - "version": "==3.0.4" + "version": "==3.2.0a0" }, - "monotonic": { + "molecule-docker": { "hashes": [ - "sha256:23953d55076df038541e648a53676fb24980f7a1be290cdda21300b3bc21dfb0", - "sha256:552a91f381532e33cbd07c6a2655a21908088962bb8fa7239ecbcc6ad1140cc7" + "sha256:1799d94dc9dcf3d9205b359e5ddecaaed5083e8ae39221570e57c9f1f5d45fc4", + "sha256:5e0a633c86aa4d27603e5043be4d71d91fa15cbedf61345a5c17aab2421505fd" ], - "version": "==1.5" + "version": "==0.3.3" }, "nodeenv": { "hashes": [ @@ -510,6 +524,7 @@ "sha256:4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8", "sha256:998416ba6962ae7fbd6596850b80e17859a5753ba17c32284f67bfff33784181" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==20.4" }, "paramiko": { @@ -538,6 +553,7 @@ "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0", "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==0.13.1" }, "poyo": { @@ -545,6 +561,7 @@ "sha256:3e2ca8e33fdc3c411cd101ca395668395dd5dc7ac775b8e809e3def9f9fe041a", "sha256:e26956aa780c45f011ca9886f044590e2d8fd8b61db7b1c1cf4e0869f48ed4dd" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==0.5.0" }, "pre-commit": { @@ -567,6 +584,7 @@ "sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0", "sha256:7582ad22678f0fcd81102833f60ef8d0e57288b6b5fb00323d101be910e35705" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.20" }, "pygments": { @@ -574,6 +592,7 @@ "sha256:381985fcc551eb9d37c52088a32914e00517e57f4a21609f48141ba08e193fa0", "sha256:88a0bbcd659fcb9573703957c6b9cff9fab7295e6e76db54c9d00ae42df32773" ], + "markers": "python_version >= '3.5'", "version": "==2.7.2" }, "pynacl": { @@ -597,6 +616,7 @@ "sha256:ea6841bc3a76fa4942ce00f3bda7d436fda21e2d91602b9e21b7ca9ecab8f3ff", "sha256:f8851ab9041756003119368c1e6cd0b9c631f46d686b3904b18c0139f4419f80" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.4.0" }, "pyparsing": { @@ -604,6 +624,7 @@ "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1", "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b" ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.4.7" }, "python-dateutil": { @@ -611,14 +632,9 @@ "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c", "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.8.1" }, - "python-gilt": { - "hashes": [ - "sha256:e220ea2e7e190ee06dbfa5fafe87967858b4ac0cf53f3072fa6ece4664a42082" - ], - "version": "==1.2.3" - }, "python-slugify": { "hashes": [ "sha256:69a517766e00c1268e5bbfc0d010a0a8508de0b18d30ad5a1ff357f8ae724270" @@ -646,6 +662,7 @@ "sha256:b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b", "sha256:fe75cc94a9443b9246fc7049224f75604b113c36acb93f87b80ed42c44cbb898" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==2.24.0" }, "rich": { @@ -653,6 +670,7 @@ "sha256:05f1cf4dc191c483867b098d8572546de266440d61911d8270069023e325d14a", "sha256:5dd934a0f8953b59d9a5d8d58864012174f0b5ad2de687fd04f4df195f7f7066" ], + "markers": "python_version >= '3.6' and python_version < '4.0'", "version": "==9.1.0" }, "ruamel.yaml": { @@ -690,7 +708,7 @@ "sha256:e9f7d1d8c26a6a12c23421061f9022bb62704e38211fe375c645485f38df34a2", "sha256:f6061a31880c1ed6b6ce341215336e2f3d0c1deccd84957b6fa8ca474b41e89f" ], - "markers": "platform_python_implementation == 'CPython' and python_version < '3.9'", + "markers": "python_version < '3.9' and platform_python_implementation == 'CPython'", "version": "==0.2.2" }, "selinux": { @@ -698,21 +716,15 @@ "sha256:820adcf1b4451c9cc7759848797703263ba0eb6a4cad76d73548a9e0d57b7926", "sha256:d435f514e834e3fdc0941f6a29d086b80b2ea51b28112aee6254bd104ee42a74" ], - "markers": "sys_platform == 'linux'", + "markers": "sys_platform == 'linux' and sys_platform == 'linux'", "version": "==0.2.1" }, - "sh": { - "hashes": [ - "sha256:ae3258c5249493cebe73cb4e18253a41ed69262484bad36fdb3efcb8ad8870bb", - "sha256:b52bf5833ed01c7b5c5fb73a7f71b3d98d48e9b9b8764236237bdc7ecae850fc" - ], - "version": "==1.12.14" - }, "shellingham": { "hashes": [ "sha256:576c1982bea0ba82fb46c36feb951319d7f42214a82634233f58b40d858a751e", "sha256:7f6206ae169dc1a03af8a138681b3f962ae61cc93ade84d0585cca3aaf770044" ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.3.2" }, "six": { @@ -720,14 +732,16 @@ "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.15.0" }, - "tabulate": { + "subprocess-tee": { "hashes": [ - "sha256:ac64cb76d53b1231d364babcd72abbb16855adac7de6665122f97b593f1eb2ba", - "sha256:db2723a20d04bcda8522165c73eea7c300eda74e0ce852d9022e0159d7895007" + "sha256:51ac728467619e4d1688fc8607e3104f95e079f8c9cf046383eb7867f2b5e8cd", + "sha256:c47c6da612caac466cb2d849ef2859d6dccf09e899f59611ed729aa65ca4c91a" ], - "version": "==0.8.7" + "markers": "python_version >= '3.6'", + "version": "==0.1.3" }, "text-unidecode": { "hashes": [ @@ -741,15 +755,9 @@ "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b", "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==0.10.2" }, - "tree-format": { - "hashes": [ - "sha256:a538523aa78ae7a4b10003b04f3e1b37708e0e089d99c9d3b9e1c71384c9a7f9", - "sha256:b5056228dbedde1fb81b79f71fb0c23c98e9d365230df9b29af76e8d8003de11" - ], - "version": "==0.1.2" - }, "typing-extensions": { "hashes": [ "sha256:7cb407020f00f7bfc3cb3e7881628838e69d8f3fcab2f64742a5e76b2f841918", @@ -763,6 +771,7 @@ "sha256:8d7eaa5a82a1cac232164990f04874c594c9453ec55eef02eab885aa02fc17a2", "sha256:f5321fbe4bf3fefa0efd0bfe7fb14e90909eb62a48ccda331726b4319897dd5e" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'", "version": "==1.25.11" }, "virtualenv": { @@ -770,6 +779,7 @@ "sha256:b0011228208944ce71052987437d3843e05690b2f23d1c7da4263fde104c97a2", "sha256:b8d6110f493af256a40d65e29846c69340a947669eec8ce784fcf3dd3af28380" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==20.1.0" }, "websocket-client": { diff --git a/README.md b/README.md index e9c61e3d..1a285d6e 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,13 @@ Use the `tailscale_auth_key` variable instead. In the future, this parameter will be replaced with a map of supported command-line arguments. Since Tailscale is still undergoing rapid development, we are holding off on creating such an argument map until features are more stable. +### verbose + +**Default**: `false` + +Whether to output additional information during role execution. +Helpful for debugging and collecting information to submit in a GitHub issue on this repository. + ## Dependencies None @@ -132,6 +139,25 @@ Pass arbitrary command-line arguments: 3537 ``` +Get verbose output: + +```yaml +- name: Servers + hosts: all + roles: + - role: artis3n.tailscale + vars: + # Fake example encrypted by ansible-vault + tailscale_auth_key: !vault | + $ANSIBLE_VAULT;1.2;AES256;tailscale + 32616238303134343065613038383933333733383765653166346564363332343761653761646363 + 6637666565626333333664363739613366363461313063640a613330393062323161636235383936 + 37373734653036613133613533376139383138613164323661386362376335316364653037353631 + 6539646561373535610a643334396234396332376431326565383432626232383131303131363362 + 3537 + verbose: true +``` + ## License MIT diff --git a/defaults/main.yml b/defaults/main.yml index a815f04f..b7f189b3 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -41,3 +41,7 @@ dnf_yum_dependencies: dnf_repos: Fedora: https://pkgs.tailscale.com/{{ release_stability | lower }}/fedora/tailscale.repo + +arch_dependencies: + - glibc + - go diff --git a/handlers/main.yml b/handlers/main.yml index df7bba86..53b620a6 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -5,8 +5,15 @@ command: tailscale status register: handlers_tailscale_status +- name: Debug Tailscale Status + listen: Confirm Tailscale is Connected + debug: + var: handlers_tailscale_status + when: verbose | bool + - name: Assert Tailscale is Connected listen: Confirm Tailscale is Connected assert: that: - handlers_tailscale_status.stdout | length != 0 + - handlers_tailscale_status.stdout is not match('\[L\+V9o\]') diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index c8bffddf..03c35cec 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -13,3 +13,4 @@ 62366639653431623836313965626534643961323862623833626430303236353835353438366161 3238373235646164300a366231373362616330616565383033623034373366306130646166613231 36373738623939313136653031643038336262653533383234326435303533383932 + verbose: true diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index c9174684..0e8e1962 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -11,7 +11,7 @@ platforms: - name: instance image: ${MOLECULE_DISTRO:-geerlingguy/docker-ubuntu2004-ansible:latest} # Needed for systemd - command: ${MOLECULE_DOCKER_COMMAND:-""} + command: ${MOLECULE_DOCKER_COMMAND:-/lib/systemd/systemd} volumes: - /sys/fs/cgroup:/sys/fs/cgroup:ro privileged: true diff --git a/molecule/default/verify.yml b/molecule/default/verify.yml index b74a485b..3f3a5593 100644 --- a/molecule/default/verify.yml +++ b/molecule/default/verify.yml @@ -11,4 +11,5 @@ - name: Assertions assert: that: - - tailscale_status.stdout | length != 0 + - '"linux" in tailscale_status.stdout' + - '"L+V9o" not in tailscale_status.stdout' diff --git a/tasks/arch.yml b/tasks/arch.yml index 2acc317c..d82d3035 100644 --- a/tasks/arch.yml +++ b/tasks/arch.yml @@ -1,5 +1,12 @@ --- +- name: Arch | Install Dependencies + become: yes + pacman: + name: '{{ arch_dependencies }}' + update_cache: yes + state: present + - name: Arch | Ensure non-root user become: yes user: diff --git a/tasks/main.yml b/tasks/main.yml index 98044245..cb8e6141 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,13 +1,19 @@ --- - name: Tailscale Auth Key Required fail: - msg: "You must include a Node Authorization auth key. Set a `tailscale_auth_key` ansible-vault encrypted variable. You can create this key from: https://login.tailscale.com/admin/authkeys" # noqa 204 + msg: > + You must include a Node Authorization auth key. + Set a `tailscale_auth_key` ansible-vault encrypted variable. + You can create this key from: https://login.tailscale.com/admin/authkeys" when: tailscale_auth_key is not defined - name: Unstable Warning # Print an error message to the console but proceed anyway fail: - msg: Installing Tailscale from the unstable branch. This is bleeding edge and may have issues. Be warned. + msg: > + Installing Tailscale from the unstable branch. + This is bleeding edge and may have issues. + Be warned. when: release_stability | lower == 'unstable' ignore_errors: yes @@ -43,6 +49,22 @@ changed_when: false register: tailscale_status +- name: Tailscale Status + debug: + var: tailscale_status + when: verbose | bool + +- name: Record Tailscale Version + command: tailscale version + changed_when: false + register: tailscale_version + when: verbose | bool + +- name: Tailscale Version + debug: + msg: "{{ tailscale_version.stdout.split('\n') }}" + when: verbose | bool + - name: Bring Tailscale Up become: yes # The command module cannot use | ; & @@ -51,5 +73,7 @@ # Since the auth key is included in this task, we do not want to log output no_log: true register: tailscale_start - when: tailscale_status.stdout | length == 0 + when: > + tailscale_status.stdout | length == 0 + or tailscale_status.stdout is match('\[L\+V9o\]') notify: Confirm Tailscale is Connected diff --git a/vars/main.yml b/vars/main.yml index 2405a4ba..86ddfe63 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,2 +1,5 @@ --- # vars file for artis3n.tailscale + +# Whether to output debug information during role execution +verbose: false