diff --git a/.ansible-lint b/.ansible-lint deleted file mode 100644 index d6aa1c6..0000000 --- a/.ansible-lint +++ /dev/null @@ -1,2 +0,0 @@ -exclude_paths: - - files/secrets.yml diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..ae587c4 --- /dev/null +++ b/.flake8 @@ -0,0 +1,3 @@ +[flake8] +ignore = E402 +max-line-length = 100 diff --git a/.github/workflows/ansible.yml b/.github/workflows/ansible.yml deleted file mode 100644 index e6c9145..0000000 --- a/.github/workflows/ansible.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Ansible - Playbook review - -on: - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - build: - - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest] - - steps: - - uses: actions/checkout@v1 - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install pipenv - pipenv install --dev - pipenv run ansible-galaxy install -r requirements.yml - - name: Lint with flake8 - run: | - pip install flake8 - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Lint with Ansible-lint - run: | - pipenv run ansible-lint -c .ansible-lint *.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..d3a49b1 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,31 @@ +name: Ansible + +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Python 3 + uses: actions/setup-python@v2 + with: + python-version: '3.8' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pipenv + pipenv install --dev + pipenv run ansible-galaxy install -r requirements.yml + pipenv run ansible-galaxy collection install -r requirements.yml + echo "${{ secrets.VAULT_PASS }}" > .vault_pass + + - name: Molecule + run: pipenv run molecule test diff --git a/.gitignore b/.gitignore index a15cf47..732e1e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,6 @@ -venv/ .vscode .vault_pass .idea roles/ -.vagrant/ -files/secrets.yml collections/ +__pycache__ diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..96453c2 --- /dev/null +++ b/.yamllint @@ -0,0 +1,36 @@ +--- +# Based on ansible-lint config +extends: default + +ignore: | + .pre-commit-config.yaml + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + colons: + max-spaces-after: -1 + level: error + commas: + max-spaces-after: -1 + level: error + comments: disable + comments-indentation: disable + document-start: disable + empty-lines: + max: 3 + level: error + hyphens: + level: error + indentation: disable + key-duplicates: enable + line-length: disable + new-line-at-end-of-file: disable + new-lines: + type: unix + trailing-spaces: disable + truthy: disable diff --git a/Makefile b/Makefile index fcecfaf..43f4df8 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,17 @@ #!/usr/bin/make .PHONY: all -all: install +all: dev-install .PHONY: install install: if [ ! -f /usr/bin/python3 ]; then sudo apt update && sudo apt install -y python3; fi; if [ ! -f /usr/bin/pip3 ]; then sudo apt update && sudo apt install -y python3-pip; fi; - if [ ! -f ~/.local/bin/pipenv ]; then pip3 install pipenv; fi; + if [ ! -f ~/.local/bin/pipenv ]; then pip3 install --user pipenv; fi; if [ ! -d ~/.local/share/virtualenvs ]; then mkdir -p ~/.local/share/virtualenvs/; fi; - if [ ! $$(find ~/.local/share/virtualenvs/ -name "dev-setup*") ]; then ~/.local/bin/pipenv install --python /usr/bin/python3; fi; - if [ ! -d ~/.ansible/roles/gantsign.visual-studio-code ]; then ~/.local/bin/pipenv run ansible-galaxy install gantsign.visual-studio-code; fi; - if [ ! -d ~/.ansible/roles/artis3n.bitwarden_app ]; then ~/.local/bin/pipenv run ansible-galaxy install artis3n.bitwarden_app; fi; - if [ ! -d ./collections/ansible_collections/artis3n/github_version ]; then ~/.local/bin/pipenv run ansible-galaxy collection install artis3n.github_version -p ./collections; fi; + if [ ! $$(find ~/.local/share/virtualenvs/ -name "dev-setup*") ]; then ~/.local/bin/pipenv install; fi; + ~/.local/bin/pipenv run ansible-galaxy install -r requirements.yml + ~/.local/bin/pipenv run ansible-galaxy collection install -r requirements.yml .PHONY: dev-install dev-install: install @@ -22,19 +21,19 @@ dev-install: install clean: -~/.local/bin/pipenv --rm rm -rf ~/.ansible/roles/ - rm -rf ~/.ansible/collections/ansible_collections/artis3n/github_version + rm -rf ~/.ansible/collections/ansible_collections/artis3n/github .PHONY: lint lint: - ~/.local/bin/pipenv run ansible-lint -c .ansible-lint *.yml + ~/.local/bin/pipenv run ansible-lint .PHONY: provision provision: - ~/.local/bin/pipenv run ansible-playbook --vault-id .vault_pass -i inventory main.yml --ask-become-pass + ANSIBLE_COLOR_DEBUG="magenta" ~/.local/bin/pipenv run ansible-playbook --vault-id .vault_pass -i inventory main.yml --ask-become-pass --force-handlers -.PHONY: secret -secret: - if [ -f ./files/secrets.yml ]; then ~/.local/bin/pipenv run ansible-vault edit ./files/secrets.yml; else ~/.local/bin/pipenv run ansible-vault create ./files/secrets.yml; fi; +.PHONY: test +test: + ANSIBLE_COLOR_DEBUG="magenta" pipenv run molecule test .PHONY: reset-run -reset-run: clean install run +reset-run: clean install provision diff --git a/Pipfile b/Pipfile index 79b5636..5eac7dd 100644 --- a/Pipfile +++ b/Pipfile @@ -9,6 +9,8 @@ ansible = "*" [dev-packages] pre-commit = "*" ansible-lint = "*" +molecule = {extras = ["docker"],version = "*"} +docker = "*" [requires] -python_version = "3.6" +python_version = "3.8" diff --git a/Pipfile.lock b/Pipfile.lock index 4dad3ad..056f299 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,11 +1,11 @@ { "_meta": { "hash": { - "sha256": "50b7123f057bb630535385cdad70a4e191729825743e70607606864e7a0f44e2" + "sha256": "71e079be782a28b185a2075745bce754a062141ec9d5961c796184acc655b5b9" }, "pipfile-spec": 6, "requires": { - "python_version": "3.6" + "python_version": "3.8" }, "sources": [ { @@ -18,76 +18,76 @@ "default": { "ansible": { "hashes": [ - "sha256:2f83f8ccc50640aa41a24f6e7757ac06b0ee6189fdcaacab68851771d3b42f3a" + "sha256:88f9d033ece7fd51eca3abb4f02e13b63c924b97f9705a997d5a711c0cf42ab1" ], "index": "pypi", - "version": "==2.9.2" + "version": "==2.9.11" }, "cffi": { "hashes": [ - "sha256:001bf3242a1bb04d985d63e138230802c6c8d4db3668fb545fb5005ddf5bb5ff", - "sha256:00789914be39dffba161cfc5be31b55775de5ba2235fe49aa28c148236c4e06b", - "sha256:028a579fc9aed3af38f4892bdcc7390508adabc30c6af4a6e4f611b0c680e6ac", - "sha256:14491a910663bf9f13ddf2bc8f60562d6bc5315c1f09c704937ef17293fb85b0", - "sha256:1cae98a7054b5c9391eb3249b86e0e99ab1e02bb0cc0575da191aedadbdf4384", - "sha256:2089ed025da3919d2e75a4d963d008330c96751127dd6f73c8dc0c65041b4c26", - "sha256:2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6", - "sha256:337d448e5a725bba2d8293c48d9353fc68d0e9e4088d62a9571def317797522b", - "sha256:399aed636c7d3749bbed55bc907c3288cb43c65c4389964ad5ff849b6370603e", - "sha256:3b911c2dbd4f423b4c4fcca138cadde747abdb20d196c4a48708b8a2d32b16dd", - "sha256:3d311bcc4a41408cf5854f06ef2c5cab88f9fded37a3b95936c9879c1640d4c2", - "sha256:62ae9af2d069ea2698bf536dcfe1e4eed9090211dbaafeeedf5cb6c41b352f66", - "sha256:66e41db66b47d0d8672d8ed2708ba91b2f2524ece3dee48b5dfb36be8c2f21dc", - "sha256:675686925a9fb403edba0114db74e741d8181683dcf216be697d208857e04ca8", - "sha256:7e63cbcf2429a8dbfe48dcc2322d5f2220b77b2e17b7ba023d6166d84655da55", - "sha256:8a6c688fefb4e1cd56feb6c511984a6c4f7ec7d2a1ff31a10254f3c817054ae4", - "sha256:8c0ffc886aea5df6a1762d0019e9cb05f825d0eec1f520c51be9d198701daee5", - "sha256:95cd16d3dee553f882540c1ffe331d085c9e629499ceadfbda4d4fde635f4b7d", - "sha256:99f748a7e71ff382613b4e1acc0ac83bf7ad167fb3802e35e90d9763daba4d78", - "sha256:b8c78301cefcf5fd914aad35d3c04c2b21ce8629b5e4f4e45ae6812e461910fa", - "sha256:c420917b188a5582a56d8b93bdd8e0f6eca08c84ff623a4c16e809152cd35793", - "sha256:c43866529f2f06fe0edc6246eb4faa34f03fe88b64a0a9a942561c8e22f4b71f", - "sha256:cab50b8c2250b46fe738c77dbd25ce017d5e6fb35d3407606e7a4180656a5a6a", - "sha256:cef128cb4d5e0b3493f058f10ce32365972c554572ff821e175dbc6f8ff6924f", - "sha256:cf16e3cf6c0a5fdd9bc10c21687e19d29ad1fe863372b5543deaec1039581a30", - "sha256:e56c744aa6ff427a607763346e4170629caf7e48ead6921745986db3692f987f", - "sha256:e577934fc5f8779c554639376beeaa5657d54349096ef24abe8c74c5d9c117c3", - "sha256:f2b0fa0c01d8a0c7483afd9f31d7ecf2d71760ca24499c8697aeb5ca37dc090c" - ], - "version": "==1.14.0" + "sha256:267adcf6e68d77ba154334a3e4fc921b8e63cbb38ca00d33d40655d4228502bc", + "sha256:26f33e8f6a70c255767e3c3f957ccafc7f1f706b966e110b855bfe944511f1f9", + "sha256:3cd2c044517f38d1b577f05927fb9729d3396f1d44d0c659a445599e79519792", + "sha256:4a03416915b82b81af5502459a8a9dd62a3c299b295dcdf470877cb948d655f2", + "sha256:4ce1e995aeecf7cc32380bc11598bfdfa017d592259d5da00fc7ded11e61d022", + "sha256:4f53e4128c81ca3212ff4cf097c797ab44646a40b42ec02a891155cd7a2ba4d8", + "sha256:4fa72a52a906425416f41738728268072d5acfd48cbe7796af07a923236bcf96", + "sha256:66dd45eb9530e3dde8f7c009f84568bc7cac489b93d04ac86e3111fb46e470c2", + "sha256:6923d077d9ae9e8bacbdb1c07ae78405a9306c8fd1af13bfa06ca891095eb995", + "sha256:833401b15de1bb92791d7b6fb353d4af60dc688eaa521bd97203dcd2d124a7c1", + "sha256:8416ed88ddc057bab0526d4e4e9f3660f614ac2394b5e019a628cdfff3733849", + "sha256:892daa86384994fdf4856cb43c93f40cbe80f7f95bb5da94971b39c7f54b3a9c", + "sha256:98be759efdb5e5fa161e46d404f4e0ce388e72fbf7d9baf010aff16689e22abe", + "sha256:a6d28e7f14ecf3b2ad67c4f106841218c8ab12a0683b1528534a6c87d2307af3", + "sha256:b1d6ebc891607e71fd9da71688fcf332a6630b7f5b7f5549e6e631821c0e5d90", + "sha256:b2a2b0d276a136146e012154baefaea2758ef1f56ae9f4e01c612b0831e0bd2f", + "sha256:b87dfa9f10a470eee7f24234a37d1d5f51e5f5fa9eeffda7c282e2b8f5162eb1", + "sha256:bac0d6f7728a9cc3c1e06d4fcbac12aaa70e9379b3025b27ec1226f0e2d404cf", + "sha256:c991112622baee0ae4d55c008380c32ecfd0ad417bcd0417ba432e6ba7328caa", + "sha256:cda422d54ee7905bfc53ee6915ab68fe7b230cacf581110df4272ee10462aadc", + "sha256:d3148b6ba3923c5850ea197a91a42683f946dba7e8eb82dfa211ab7e708de939", + "sha256:d6033b4ffa34ef70f0b8086fd4c3df4bf801fee485a8a7d4519399818351aa8e", + "sha256:ddff0b2bd7edcc8c82d1adde6dbbf5e60d57ce985402541cd2985c27f7bec2a0", + "sha256:e23cb7f1d8e0f93addf0cae3c5b6f00324cccb4a7949ee558d7b6ca973ab8ae9", + "sha256:effd2ba52cee4ceff1a77f20d2a9f9bf8d50353c854a282b8760ac15b9833168", + "sha256:f90c2267101010de42f7273c94a1f026e56cbc043f9330acd8a80e64300aba33", + "sha256:f960375e9823ae6a07072ff7f8a85954e5a6434f97869f50d0e41649a1c8144f", + "sha256:fcf32bf76dc25e30ed793145a57426064520890d7c02866eb93d3e4abe516948" + ], + "version": "==1.14.1" }, "cryptography": { "hashes": [ - "sha256:02079a6addc7b5140ba0825f542c0869ff4df9a69c360e339ecead5baefa843c", - "sha256:1df22371fbf2004c6f64e927668734070a8953362cd8370ddd336774d6743595", - "sha256:369d2346db5934345787451504853ad9d342d7f721ae82d098083e1f49a582ad", - "sha256:3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02871651", - "sha256:44ff04138935882fef7c686878e1c8fd80a723161ad6a98da31e14b7553170c2", - "sha256:4b1030728872c59687badcca1e225a9103440e467c17d6d1730ab3d2d64bfeff", - "sha256:58363dbd966afb4f89b3b11dfb8ff200058fbc3b947507675c19ceb46104b48d", - "sha256:6ec280fb24d27e3d97aa731e16207d58bd8ae94ef6eab97249a2afe4ba643d42", - "sha256:7270a6c29199adc1297776937a05b59720e8a782531f1f122f2eb8467f9aab4d", - "sha256:73fd30c57fa2d0a1d7a49c561c40c2f79c7d6c374cc7750e9ac7c99176f6428e", - "sha256:7f09806ed4fbea8f51585231ba742b58cbcfbfe823ea197d8c89a5e433c7e912", - "sha256:90df0cc93e1f8d2fba8365fb59a858f51a11a394d64dbf3ef844f783844cc793", - "sha256:971221ed40f058f5662a604bd1ae6e4521d84e6cad0b7b170564cc34169c8f13", - "sha256:a518c153a2b5ed6b8cc03f7ae79d5ffad7315ad4569b2d5333a13c38d64bd8d7", - "sha256:b0de590a8b0979649ebeef8bb9f54394d3a41f66c5584fff4220901739b6b2f0", - "sha256:b43f53f29816ba1db8525f006fa6f49292e9b029554b3eb56a189a70f2a40879", - "sha256:d31402aad60ed889c7e57934a03477b572a03af7794fa8fb1780f21ea8f6551f", - "sha256:de96157ec73458a7f14e3d26f17f8128c959084931e8997b9e655a39c8fde9f9", - "sha256:df6b4dca2e11865e6cfbfb708e800efb18370f5a46fd601d3755bc7f85b3a8a2", - "sha256:ecadccc7ba52193963c0475ac9f6fa28ac01e01349a2ca48509667ef41ffd2cf", - "sha256:fb81c17e0ebe3358486cd8cc3ad78adbae58af12fc2bf2bc0bb84e8090fa5ce8" - ], - "version": "==2.8" + "sha256:0c608ff4d4adad9e39b5057de43657515c7da1ccb1807c3a27d4cf31fc923b4b", + "sha256:0cbfed8ea74631fe4de00630f4bb592dad564d57f73150d6f6796a24e76c76cd", + "sha256:124af7255ffc8e964d9ff26971b3a6153e1a8a220b9a685dc407976ecb27a06a", + "sha256:384d7c681b1ab904fff3400a6909261cae1d0939cc483a68bdedab282fb89a07", + "sha256:45741f5499150593178fc98d2c1a9c6722df88b99c821ad6ae298eff0ba1ae71", + "sha256:4b9303507254ccb1181d1803a2080a798910ba89b1a3c9f53639885c90f7a756", + "sha256:4d355f2aee4a29063c10164b032d9fa8a82e2c30768737a2fd56d256146ad559", + "sha256:51e40123083d2f946794f9fe4adeeee2922b581fa3602128ce85ff813d85b81f", + "sha256:8713ddb888119b0d2a1462357d5946b8911be01ddbf31451e1d07eaa5077a261", + "sha256:8e924dbc025206e97756e8903039662aa58aa9ba357d8e1d8fc29e3092322053", + "sha256:8ecef21ac982aa78309bb6f092d1677812927e8b5ef204a10c326fc29f1367e2", + "sha256:8ecf9400d0893836ff41b6f977a33972145a855b6efeb605b49ee273c5e6469f", + "sha256:9367d00e14dee8d02134c6c9524bb4bd39d4c162456343d07191e2a0b5ec8b3b", + "sha256:a09fd9c1cca9a46b6ad4bea0a1f86ab1de3c0c932364dbcf9a6c2a5eeb44fa77", + "sha256:ab49edd5bea8d8b39a44b3db618e4783ef84c19c8b47286bf05dfdb3efb01c83", + "sha256:bea0b0468f89cdea625bb3f692cd7a4222d80a6bdafd6fb923963f2b9da0e15f", + "sha256:bec7568c6970b865f2bcebbe84d547c52bb2abadf74cefce396ba07571109c67", + "sha256:ce82cc06588e5cbc2a7df3c8a9c778f2cb722f56835a23a68b5a7264726bb00c", + "sha256:dea0ba7fe6f9461d244679efa968d215ea1f989b9c1957d7f10c21e5c7c09ad6" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==3.0" }, "jinja2": { "hashes": [ - "sha256:93187ffbc7808079673ef52771baa950426fd664d3aad1d0fa3e95644360e250", - "sha256:b0eaf100007721b5c16c1fc1eecb87409464edc10469ddc9a22a27a99123be49" + "sha256:89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0", + "sha256:f0a4641d3cf955324a89c04f3d94663aa4d638abe8f733ecd3582848e1c37035" ], - "version": "==2.11.1" + "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": { "hashes": [ @@ -125,139 +125,257 @@ "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" }, "pycparser": { "hashes": [ - "sha256:a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3" + "sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0", + "sha256:7582ad22678f0fcd81102833f60ef8d0e57288b6b5fb00323d101be910e35705" ], - "version": "==2.19" + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==2.20" }, "pyyaml": { "hashes": [ - "sha256:059b2ee3194d718896c0ad077dd8c043e5e909d9180f387ce42012662a4946d6", - "sha256:1cf708e2ac57f3aabc87405f04b86354f66799c8e62c28c5fc5f88b5521b2dbf", - "sha256:24521fa2890642614558b492b473bee0ac1f8057a7263156b02e8b14c88ce6f5", - "sha256:4fee71aa5bc6ed9d5f116327c04273e25ae31a3020386916905767ec4fc5317e", - "sha256:70024e02197337533eef7b85b068212420f950319cc8c580261963aefc75f811", - "sha256:74782fbd4d4f87ff04159e986886931456a1894c61229be9eaf4de6f6e44b99e", - "sha256:940532b111b1952befd7db542c370887a8611660d2b9becff75d39355303d82d", - "sha256:cb1f2f5e426dc9f07a7681419fe39cee823bb74f723f36f70399123f439e9b20", - "sha256:dbbb2379c19ed6042e8f11f2a2c66d39cceb8aeace421bfc29d085d93eda3689", - "sha256:e3a057b7a64f1222b56e47bcff5e4b94c4f61faac04c7c4ecb1985e18caa3994", - "sha256:e9f45bd5b92c7974e59bcd2dcc8631a6b6cc380a904725fce7bc08872e691615" + "sha256:06a0d7ba600ce0b2d2fe2e78453a470b5a6e000a985dd4a4e54e436cc36b0e97", + "sha256:240097ff019d7c70a4922b6869d8a86407758333f02203e0fc6ff79c5dcede76", + "sha256:4f4b913ca1a7319b33cfb1369e91e50354d6f07a135f3b901aca02aa95940bd2", + "sha256:69f00dca373f240f842b2931fb2c7e14ddbacd1397d57157a9b005a6a9942648", + "sha256:73f099454b799e05e5ab51423c7bcf361c58d3206fa7b0d555426b1f4d9a3eaf", + "sha256:74809a57b329d6cc0fdccee6318f44b9b8649961fa73144a98735b0aaf029f1f", + "sha256:7739fc0fa8205b3ee8808aea45e968bc90082c10aef6ea95e855e10abf4a37b2", + "sha256:95f71d2af0ff4227885f7a6605c37fd53d3a106fcab511b8860ecca9fcf400ee", + "sha256:b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d", + "sha256:cc8955cfbfc7a115fa81d85284ee61147059a753344bc51098f3ccd69b0d7e0c", + "sha256:d13155f591e6fcc1ec3b30685d50bf0711574e2c0dfffd7644babf8b5102ca1a" ], - "version": "==5.3" + "version": "==5.3.1" }, "six": { "hashes": [ - "sha256:236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a", - "sha256:8f3cd2e254d8f793e7f3d6d9df77b92252b52637291d0f0da013c76ea2724b6c" + "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", + "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" ], - "version": "==1.14.0" + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", + "version": "==1.15.0" } }, "develop": { "ansible": { "hashes": [ - "sha256:2f83f8ccc50640aa41a24f6e7757ac06b0ee6189fdcaacab68851771d3b42f3a" + "sha256:88f9d033ece7fd51eca3abb4f02e13b63c924b97f9705a997d5a711c0cf42ab1" ], "index": "pypi", - "version": "==2.9.2" + "version": "==2.9.11" }, "ansible-lint": { "hashes": [ - "sha256:9430ea6e654ba4bf5b9c6921efc040f46cda9c4fd2896a99ff71d21037bcb123", - "sha256:c1b442b01091eca13ef11d98c3376e9489ba5b69a8467828ca86044f384bc0a1" + "sha256:b9fc9a6564f5d60a4284497f966f38ef78f0e2505edbe2bd1225f1ade31c2d8a", + "sha256:eb925d8682d70563ccb80e2aca7b3edf84fb0b768cea3edc6846aac7abdc414a" ], "index": "pypi", - "version": "==4.1.0" + "version": "==4.2.0" }, "appdirs": { "hashes": [ - "sha256:9e5896d1372858f8dd3344faf4e5014d21849c756c8d5701f78f8a103b372d92", - "sha256:d8b24664561d0d34ddfaec54636d502d7cea6e29c3eaf68f3df6180863e2166e" + "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41", + "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128" ], - "version": "==1.4.3" + "version": "==1.4.4" }, - "aspy.yaml": { + "arrow": { "hashes": [ - "sha256:463372c043f70160a9ec950c3f1e4c3a82db5fca01d334b6bc89c7164d744bdc", - "sha256:e7c742382eff2caed61f87a39d13f99109088e5e93f04d76eb8d4b28aa143f45" + "sha256:271b8e05174d48e50324ed0dc5d74796c839c7e579a4f21cf1a7394665f9e94f", + "sha256:edc31dc051db12c95da9bac0271cd1027b8e36912daf6d4580af53b23e62721a" ], - "version": "==1.3.0" + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==0.15.8" + }, + "bcrypt": { + "hashes": [ + "sha256:0258f143f3de96b7c14f762c770f5fc56ccd72f8a1857a451c1cd9a655d9ac89", + "sha256:0b0069c752ec14172c5f78208f1863d7ad6755a6fae6fe76ec2c80d13be41e42", + "sha256:19a4b72a6ae5bb467fea018b825f0a7d917789bcfe893e53f15c92805d187294", + "sha256:436a487dec749bca7e6e72498a75a5fa2433bda13bac91d023e18df9089ae0b8", + "sha256:5432dd7b34107ae8ed6c10a71b4397f1c853bd39a4d6ffa7e35f40584cffd161", + "sha256:6305557019906466fc42dbc53b46da004e72fd7a551c044a827e572c82191752", + "sha256:69361315039878c0680be456640f8705d76cb4a3a3fe1e057e0f261b74be4b31", + "sha256:6fe49a60b25b584e2f4ef175b29d3a83ba63b3a4df1b4c0605b826668d1b6be5", + "sha256:74a015102e877d0ccd02cdeaa18b32aa7273746914a6c5d0456dd442cb65b99c", + "sha256:763669a367869786bb4c8fcf731f4175775a5b43f070f50f46f0b59da45375d0", + "sha256:8b10acde4e1919d6015e1df86d4c217d3b5b01bb7744c36113ea43d529e1c3de", + "sha256:9fe92406c857409b70a38729dbdf6578caf9228de0aef5bc44f859ffe971a39e", + "sha256:a190f2a5dbbdbff4b74e3103cef44344bc30e61255beb27310e2aec407766052", + "sha256:a595c12c618119255c90deb4b046e1ca3bcfad64667c43d1166f2b04bc72db09", + "sha256:c9457fa5c121e94a58d6505cadca8bed1c64444b83b3204928a866ca2e599105", + "sha256:cb93f6b2ab0f6853550b74e051d297c27a638719753eb9ff66d1e4072be67133", + "sha256:ce4e4f0deb51d38b1611a27f330426154f2980e66582dc5f438aad38b5f24fc1", + "sha256:d7bdc26475679dd073ba0ed2766445bb5b20ca4793ca0db32b399dccc6bc84b7", + "sha256:ff032765bb8716d9387fd5376d987a937254b0619eff0972779515b5c98820bc" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==3.1.7" + }, + "binaryornot": { + "hashes": [ + "sha256:359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061", + "sha256:b8b71173c917bddcd2c16070412e369c3ed7f0528926f70cac18a6c97fd563e4" + ], + "version": "==0.4.4" + }, + "cerberus": { + "hashes": [ + "sha256:302e6694f206dd85cb63f13fd5025b31ab6d38c99c50c6d769f8fa0b0f299589" + ], + "markers": "python_version >= '2.7'", + "version": "==1.3.2" + }, + "certifi": { + "hashes": [ + "sha256:5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3", + "sha256:8fc0819f1f30ba15bdb34cceffb9ef04d99f420f68eb75d901e9560b8749fc41" + ], + "version": "==2020.6.20" }, "cffi": { "hashes": [ - "sha256:001bf3242a1bb04d985d63e138230802c6c8d4db3668fb545fb5005ddf5bb5ff", - "sha256:00789914be39dffba161cfc5be31b55775de5ba2235fe49aa28c148236c4e06b", - "sha256:028a579fc9aed3af38f4892bdcc7390508adabc30c6af4a6e4f611b0c680e6ac", - "sha256:14491a910663bf9f13ddf2bc8f60562d6bc5315c1f09c704937ef17293fb85b0", - "sha256:1cae98a7054b5c9391eb3249b86e0e99ab1e02bb0cc0575da191aedadbdf4384", - "sha256:2089ed025da3919d2e75a4d963d008330c96751127dd6f73c8dc0c65041b4c26", - "sha256:2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6", - "sha256:337d448e5a725bba2d8293c48d9353fc68d0e9e4088d62a9571def317797522b", - "sha256:399aed636c7d3749bbed55bc907c3288cb43c65c4389964ad5ff849b6370603e", - "sha256:3b911c2dbd4f423b4c4fcca138cadde747abdb20d196c4a48708b8a2d32b16dd", - "sha256:3d311bcc4a41408cf5854f06ef2c5cab88f9fded37a3b95936c9879c1640d4c2", - "sha256:62ae9af2d069ea2698bf536dcfe1e4eed9090211dbaafeeedf5cb6c41b352f66", - "sha256:66e41db66b47d0d8672d8ed2708ba91b2f2524ece3dee48b5dfb36be8c2f21dc", - "sha256:675686925a9fb403edba0114db74e741d8181683dcf216be697d208857e04ca8", - "sha256:7e63cbcf2429a8dbfe48dcc2322d5f2220b77b2e17b7ba023d6166d84655da55", - "sha256:8a6c688fefb4e1cd56feb6c511984a6c4f7ec7d2a1ff31a10254f3c817054ae4", - "sha256:8c0ffc886aea5df6a1762d0019e9cb05f825d0eec1f520c51be9d198701daee5", - "sha256:95cd16d3dee553f882540c1ffe331d085c9e629499ceadfbda4d4fde635f4b7d", - "sha256:99f748a7e71ff382613b4e1acc0ac83bf7ad167fb3802e35e90d9763daba4d78", - "sha256:b8c78301cefcf5fd914aad35d3c04c2b21ce8629b5e4f4e45ae6812e461910fa", - "sha256:c420917b188a5582a56d8b93bdd8e0f6eca08c84ff623a4c16e809152cd35793", - "sha256:c43866529f2f06fe0edc6246eb4faa34f03fe88b64a0a9a942561c8e22f4b71f", - "sha256:cab50b8c2250b46fe738c77dbd25ce017d5e6fb35d3407606e7a4180656a5a6a", - "sha256:cef128cb4d5e0b3493f058f10ce32365972c554572ff821e175dbc6f8ff6924f", - "sha256:cf16e3cf6c0a5fdd9bc10c21687e19d29ad1fe863372b5543deaec1039581a30", - "sha256:e56c744aa6ff427a607763346e4170629caf7e48ead6921745986db3692f987f", - "sha256:e577934fc5f8779c554639376beeaa5657d54349096ef24abe8c74c5d9c117c3", - "sha256:f2b0fa0c01d8a0c7483afd9f31d7ecf2d71760ca24499c8697aeb5ca37dc090c" - ], - "version": "==1.14.0" + "sha256:267adcf6e68d77ba154334a3e4fc921b8e63cbb38ca00d33d40655d4228502bc", + "sha256:26f33e8f6a70c255767e3c3f957ccafc7f1f706b966e110b855bfe944511f1f9", + "sha256:3cd2c044517f38d1b577f05927fb9729d3396f1d44d0c659a445599e79519792", + "sha256:4a03416915b82b81af5502459a8a9dd62a3c299b295dcdf470877cb948d655f2", + "sha256:4ce1e995aeecf7cc32380bc11598bfdfa017d592259d5da00fc7ded11e61d022", + "sha256:4f53e4128c81ca3212ff4cf097c797ab44646a40b42ec02a891155cd7a2ba4d8", + "sha256:4fa72a52a906425416f41738728268072d5acfd48cbe7796af07a923236bcf96", + "sha256:66dd45eb9530e3dde8f7c009f84568bc7cac489b93d04ac86e3111fb46e470c2", + "sha256:6923d077d9ae9e8bacbdb1c07ae78405a9306c8fd1af13bfa06ca891095eb995", + "sha256:833401b15de1bb92791d7b6fb353d4af60dc688eaa521bd97203dcd2d124a7c1", + "sha256:8416ed88ddc057bab0526d4e4e9f3660f614ac2394b5e019a628cdfff3733849", + "sha256:892daa86384994fdf4856cb43c93f40cbe80f7f95bb5da94971b39c7f54b3a9c", + "sha256:98be759efdb5e5fa161e46d404f4e0ce388e72fbf7d9baf010aff16689e22abe", + "sha256:a6d28e7f14ecf3b2ad67c4f106841218c8ab12a0683b1528534a6c87d2307af3", + "sha256:b1d6ebc891607e71fd9da71688fcf332a6630b7f5b7f5549e6e631821c0e5d90", + "sha256:b2a2b0d276a136146e012154baefaea2758ef1f56ae9f4e01c612b0831e0bd2f", + "sha256:b87dfa9f10a470eee7f24234a37d1d5f51e5f5fa9eeffda7c282e2b8f5162eb1", + "sha256:bac0d6f7728a9cc3c1e06d4fcbac12aaa70e9379b3025b27ec1226f0e2d404cf", + "sha256:c991112622baee0ae4d55c008380c32ecfd0ad417bcd0417ba432e6ba7328caa", + "sha256:cda422d54ee7905bfc53ee6915ab68fe7b230cacf581110df4272ee10462aadc", + "sha256:d3148b6ba3923c5850ea197a91a42683f946dba7e8eb82dfa211ab7e708de939", + "sha256:d6033b4ffa34ef70f0b8086fd4c3df4bf801fee485a8a7d4519399818351aa8e", + "sha256:ddff0b2bd7edcc8c82d1adde6dbbf5e60d57ce985402541cd2985c27f7bec2a0", + "sha256:e23cb7f1d8e0f93addf0cae3c5b6f00324cccb4a7949ee558d7b6ca973ab8ae9", + "sha256:effd2ba52cee4ceff1a77f20d2a9f9bf8d50353c854a282b8760ac15b9833168", + "sha256:f90c2267101010de42f7273c94a1f026e56cbc043f9330acd8a80e64300aba33", + "sha256:f960375e9823ae6a07072ff7f8a85954e5a6434f97869f50d0e41649a1c8144f", + "sha256:fcf32bf76dc25e30ed793145a57426064520890d7c02866eb93d3e4abe516948" + ], + "version": "==1.14.1" }, "cfgv": { "hashes": [ - "sha256:1ccf53320421aeeb915275a196e23b3b8ae87dea8ac6698b1638001d4a486d53", - "sha256:c8e8f552ffcc6194f4e18dd4f68d9aef0c0d58ae7e7be8c82bee3c5e9edfa513" + "sha256:32e43d604bbe7896fe7c248a9c2276447dbef840feb28fe20494f62af110211d", + "sha256:cf22deb93d4bcf92f345a5c3cd39d3d41d6340adc60c78bbbd6588c384fda6a1" + ], + "markers": "python_full_version >= '3.6.1'", + "version": "==3.2.0" + }, + "chardet": { + "hashes": [ + "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae", + "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691" + ], + "version": "==3.0.4" + }, + "click": { + "hashes": [ + "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": { + "hashes": [ + "sha256:5bf816b81367e638a190b6e91b50779007d14301b3f9f3145d68e3cade7bce86" ], - "version": "==3.1.0" + "version": "==0.5.2" + }, + "click-help-colors": { + "hashes": [ + "sha256:0d841a4058ec88c47f93ff6f32547a055f8e0a0273f6bd6cb3e08430f195131d", + "sha256:119e5faf69cfc919c995c5962326ac8fd87f11e56a371af594e3dfd8458f4c6e" + ], + "version": "==0.8" + }, + "colorama": { + "hashes": [ + "sha256:7d73d2a99753107a36ac6b455ee49046802e59d9d076ef8e47b61499fa29afff", + "sha256:e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==0.4.3" + }, + "cookiecutter": { + "hashes": [ + "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": { "hashes": [ - "sha256:02079a6addc7b5140ba0825f542c0869ff4df9a69c360e339ecead5baefa843c", - "sha256:1df22371fbf2004c6f64e927668734070a8953362cd8370ddd336774d6743595", - "sha256:369d2346db5934345787451504853ad9d342d7f721ae82d098083e1f49a582ad", - "sha256:3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02871651", - "sha256:44ff04138935882fef7c686878e1c8fd80a723161ad6a98da31e14b7553170c2", - "sha256:4b1030728872c59687badcca1e225a9103440e467c17d6d1730ab3d2d64bfeff", - "sha256:58363dbd966afb4f89b3b11dfb8ff200058fbc3b947507675c19ceb46104b48d", - "sha256:6ec280fb24d27e3d97aa731e16207d58bd8ae94ef6eab97249a2afe4ba643d42", - "sha256:7270a6c29199adc1297776937a05b59720e8a782531f1f122f2eb8467f9aab4d", - "sha256:73fd30c57fa2d0a1d7a49c561c40c2f79c7d6c374cc7750e9ac7c99176f6428e", - "sha256:7f09806ed4fbea8f51585231ba742b58cbcfbfe823ea197d8c89a5e433c7e912", - "sha256:90df0cc93e1f8d2fba8365fb59a858f51a11a394d64dbf3ef844f783844cc793", - "sha256:971221ed40f058f5662a604bd1ae6e4521d84e6cad0b7b170564cc34169c8f13", - "sha256:a518c153a2b5ed6b8cc03f7ae79d5ffad7315ad4569b2d5333a13c38d64bd8d7", - "sha256:b0de590a8b0979649ebeef8bb9f54394d3a41f66c5584fff4220901739b6b2f0", - "sha256:b43f53f29816ba1db8525f006fa6f49292e9b029554b3eb56a189a70f2a40879", - "sha256:d31402aad60ed889c7e57934a03477b572a03af7794fa8fb1780f21ea8f6551f", - "sha256:de96157ec73458a7f14e3d26f17f8128c959084931e8997b9e655a39c8fde9f9", - "sha256:df6b4dca2e11865e6cfbfb708e800efb18370f5a46fd601d3755bc7f85b3a8a2", - "sha256:ecadccc7ba52193963c0475ac9f6fa28ac01e01349a2ca48509667ef41ffd2cf", - "sha256:fb81c17e0ebe3358486cd8cc3ad78adbae58af12fc2bf2bc0bb84e8090fa5ce8" - ], - "version": "==2.8" + "sha256:0c608ff4d4adad9e39b5057de43657515c7da1ccb1807c3a27d4cf31fc923b4b", + "sha256:0cbfed8ea74631fe4de00630f4bb592dad564d57f73150d6f6796a24e76c76cd", + "sha256:124af7255ffc8e964d9ff26971b3a6153e1a8a220b9a685dc407976ecb27a06a", + "sha256:384d7c681b1ab904fff3400a6909261cae1d0939cc483a68bdedab282fb89a07", + "sha256:45741f5499150593178fc98d2c1a9c6722df88b99c821ad6ae298eff0ba1ae71", + "sha256:4b9303507254ccb1181d1803a2080a798910ba89b1a3c9f53639885c90f7a756", + "sha256:4d355f2aee4a29063c10164b032d9fa8a82e2c30768737a2fd56d256146ad559", + "sha256:51e40123083d2f946794f9fe4adeeee2922b581fa3602128ce85ff813d85b81f", + "sha256:8713ddb888119b0d2a1462357d5946b8911be01ddbf31451e1d07eaa5077a261", + "sha256:8e924dbc025206e97756e8903039662aa58aa9ba357d8e1d8fc29e3092322053", + "sha256:8ecef21ac982aa78309bb6f092d1677812927e8b5ef204a10c326fc29f1367e2", + "sha256:8ecf9400d0893836ff41b6f977a33972145a855b6efeb605b49ee273c5e6469f", + "sha256:9367d00e14dee8d02134c6c9524bb4bd39d4c162456343d07191e2a0b5ec8b3b", + "sha256:a09fd9c1cca9a46b6ad4bea0a1f86ab1de3c0c932364dbcf9a6c2a5eeb44fa77", + "sha256:ab49edd5bea8d8b39a44b3db618e4783ef84c19c8b47286bf05dfdb3efb01c83", + "sha256:bea0b0468f89cdea625bb3f692cd7a4222d80a6bdafd6fb923963f2b9da0e15f", + "sha256:bec7568c6970b865f2bcebbe84d547c52bb2abadf74cefce396ba07571109c67", + "sha256:ce82cc06588e5cbc2a7df3c8a9c778f2cb722f56835a23a68b5a7264726bb00c", + "sha256:dea0ba7fe6f9461d244679efa968d215ea1f989b9c1957d7f10c21e5c7c09ad6" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==3.0" }, "distlib": { "hashes": [ - "sha256:2e166e231a26b36d6dfe35a48c4464346620f8645ed0ace01ee31822b288de21" + "sha256:8c09de2c67b3e7deef7184574fc060ab8a793e7adbb183d942c389c8b13c52fb", + "sha256:edf6116872c863e1aa9d5bb7cb5e05a022c519a4594dc703843343a9ddd9bff1" + ], + "version": "==0.3.1" + }, + "distro": { + "hashes": [ + "sha256:0e58756ae38fbd8fc3020d54badb8eae17c5b9dcbed388b17bb55b8a5928df92", + "sha256:df74eed763e18d10d0da624258524ae80486432cd17392d9c3d96f5e83cd2799" + ], + "version": "==1.5.0" + }, + "docker": { + "hashes": [ + "sha256:03a46400c4080cb6f7aa997f881ddd84fef855499ece219d75fbdb53289c17ab", + "sha256:26eebadce7e298f55b76a88c4f8802476c5eaddbdbe38dbc6cce8781c47c9b54" ], - "version": "==0.3.0" + "index": "pypi", + "version": "==4.2.2" + }, + "fasteners": { + "hashes": [ + "sha256:007e4d2b2d4a10093f67e932e5166722d2eab83b77724156e92ad013c6226574", + "sha256:3a176da6b70df9bb88498e1a18a9e4a8579ed5b9141207762368a1017bf8f5ef" + ], + "version": "==0.15" }, "filelock": { "hashes": [ @@ -268,33 +386,34 @@ }, "identify": { "hashes": [ - "sha256:1222b648251bdcb8deb240b294f450fbf704c7984e08baa92507e4ea10b436d5", - "sha256:d824ebe21f38325c771c41b08a95a761db1982f1fc0eee37c6c97df3f1636b96" + "sha256:110ed090fec6bce1aabe3c72d9258a9de82207adeaa5a05cd75c635880312f9a", + "sha256:ccd88716b890ecbe10920659450a635d2d25de499b9a638525a48b48261d989b" ], - "version": "==1.4.11" + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==1.4.25" }, - "importlib-metadata": { + "idna": { "hashes": [ - "sha256:06f5b3a99029c7134207dd882428a66992a9de2bef7c2b699b5641f9886c3302", - "sha256:b97607a1a18a5100839aec1dc26a1ea17ee0d93b20b0f008d80a5a050afb200b" + "sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6", + "sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0" ], - "markers": "python_version < '3.8'", - "version": "==1.5.0" + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==2.10" }, - "importlib-resources": { + "jinja2": { "hashes": [ - "sha256:6e2783b2538bd5a14678284a3962b0660c715e5a0f10243fd5e00a4b5974f50b", - "sha256:d3279fd0f6f847cced9f7acc19bd3e5df54d34f93a2e7bb5f238f81545787078" + "sha256:89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0", + "sha256:f0a4641d3cf955324a89c04f3d94663aa4d638abe8f733ecd3582848e1c37035" ], - "markers": "python_version < '3.7'", - "version": "==1.0.2" + "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": { + "jinja2-time": { "hashes": [ - "sha256:93187ffbc7808079673ef52771baa950426fd664d3aad1d0fa3e95644360e250", - "sha256:b0eaf100007721b5c16c1fc1eecb87409464edc10469ddc9a22a27a99123be49" + "sha256:d14eaa4d315e7688daa4969f616f226614350c48730bfa1692d2caebd8c90d40", + "sha256:d3eab6605e3ec8b7a0863df09cc1d23714908fa61aa6986a845c20ba488b4efa" ], - "version": "==2.11.1" + "version": "==0.2.0" }, "markupsafe": { "hashes": [ @@ -332,49 +451,166 @@ "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": { + "extras": [ + "docker" + ], + "hashes": [ + "sha256:b83d73b3e34ad9bc7cc62f1869a2c9e4c4cc5e5c5a2d9de963e838d5f37fb47b", + "sha256:e3ba0fb0bab1f60b6f0aef768a3759b383267773be47ee942adadf27d9f6fa35" + ], + "index": "pypi", + "version": "==3.0.6" + }, + "monotonic": { + "hashes": [ + "sha256:23953d55076df038541e648a53676fb24980f7a1be290cdda21300b3bc21dfb0", + "sha256:552a91f381532e33cbd07c6a2655a21908088962bb8fa7239ecbcc6ad1140cc7" + ], + "version": "==1.5" + }, "nodeenv": { "hashes": [ - "sha256:5b2438f2e42af54ca968dd1b374d14a1194848955187b0e5e4be1f73813a5212" + "sha256:4b0b77afa3ba9b54f4b6396e60b0c83f59eaeb2d63dc3cc7a70f7f4af96c82bc" + ], + "version": "==1.4.0" + }, + "paramiko": { + "hashes": [ + "sha256:920492895db8013f6cc0179293147f830b8c7b21fdfc839b6bad760c27459d9f", + "sha256:9c980875fa4d2cb751604664e9a2d0f69096643f5be4db1b99599fe114a97b2f" + ], + "version": "==2.7.1" + }, + "pathspec": { + "hashes": [ + "sha256:7d91249d21749788d07a2d0f94147accd8f845507400749ea19c1ec9054a12b0", + "sha256:da45173eb3a6f2a5a487efba21f050af2b41948be6ab52b6a1e3ff22bb8b7061" + ], + "version": "==0.8.0" + }, + "pexpect": { + "hashes": [ + "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937", + "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c" ], - "version": "==1.3.5" + "version": "==4.8.0" + }, + "pluggy": { + "hashes": [ + "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": { + "hashes": [ + "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": { "hashes": [ - "sha256:9f152687127ec90642a2cc3e4d9e1e6240c4eb153615cb02aa1ad41d331cbb6e", - "sha256:c2e4810d2d3102d354947907514a78c5d30424d299dc0fe48f5aa049826e9b50" + "sha256:1657663fdd63a321a4a739915d7d03baedd555b25054449090f97bb0cb30a915", + "sha256:e8b1315c585052e729ab7e99dcca5698266bedce9067d21dc909c23e3ceed626" ], "index": "pypi", - "version": "==1.20.0" + "version": "==2.6.0" + }, + "ptyprocess": { + "hashes": [ + "sha256:923f299cc5ad920c68f2bc0bc98b75b9f838b93b599941a6b63ddbc2476394c0", + "sha256:d7cc528d76e76342423ca640335bd3633420dc1366f258cb31d05e865ef5ca1f" + ], + "version": "==0.6.0" }, "pycparser": { "hashes": [ - "sha256:a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3" + "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" + }, + "pynacl": { + "hashes": [ + "sha256:06cbb4d9b2c4bd3c8dc0d267416aaed79906e7b33f114ddbf0911969794b1cc4", + "sha256:11335f09060af52c97137d4ac54285bcb7df0cef29014a1a4efe64ac065434c4", + "sha256:2fe0fc5a2480361dcaf4e6e7cea00e078fcda07ba45f811b167e3f99e8cff574", + "sha256:30f9b96db44e09b3304f9ea95079b1b7316b2b4f3744fe3aaecccd95d547063d", + "sha256:511d269ee845037b95c9781aa702f90ccc36036f95d0f31373a6a79bd8242e25", + "sha256:537a7ccbea22905a0ab36ea58577b39d1fa9b1884869d173b5cf111f006f689f", + "sha256:54e9a2c849c742006516ad56a88f5c74bf2ce92c9f67435187c3c5953b346505", + "sha256:757250ddb3bff1eecd7e41e65f7f833a8405fede0194319f87899690624f2122", + "sha256:7757ae33dae81c300487591c68790dfb5145c7d03324000433d9a2c141f82af7", + "sha256:7c6092102219f59ff29788860ccb021e80fffd953920c4a8653889c029b2d420", + "sha256:8122ba5f2a2169ca5da936b2e5a511740ffb73979381b4229d9188f6dcb22f1f", + "sha256:9c4a7ea4fb81536c1b1f5cc44d54a296f96ae78c1ebd2311bd0b60be45a48d96", + "sha256:cd401ccbc2a249a47a3a1724c2918fcd04be1f7b54eb2a5a71ff915db0ac51c6", + "sha256:d452a6746f0a7e11121e64625109bc4468fc3100452817001dbe018bb8b08514", + "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" + }, + "python-dateutil": { + "hashes": [ + "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c", + "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", + "version": "==2.8.1" + }, + "python-gilt": { + "hashes": [ + "sha256:e220ea2e7e190ee06dbfa5fafe87967858b4ac0cf53f3072fa6ece4664a42082" + ], + "markers": "python_version >= '3.6'", + "version": "==1.2.3" + }, + "python-slugify": { + "hashes": [ + "sha256:69a517766e00c1268e5bbfc0d010a0a8508de0b18d30ad5a1ff357f8ae724270" ], - "version": "==2.19" + "version": "==4.0.1" }, "pyyaml": { "hashes": [ - "sha256:059b2ee3194d718896c0ad077dd8c043e5e909d9180f387ce42012662a4946d6", - "sha256:1cf708e2ac57f3aabc87405f04b86354f66799c8e62c28c5fc5f88b5521b2dbf", - "sha256:24521fa2890642614558b492b473bee0ac1f8057a7263156b02e8b14c88ce6f5", - "sha256:4fee71aa5bc6ed9d5f116327c04273e25ae31a3020386916905767ec4fc5317e", - "sha256:70024e02197337533eef7b85b068212420f950319cc8c580261963aefc75f811", - "sha256:74782fbd4d4f87ff04159e986886931456a1894c61229be9eaf4de6f6e44b99e", - "sha256:940532b111b1952befd7db542c370887a8611660d2b9becff75d39355303d82d", - "sha256:cb1f2f5e426dc9f07a7681419fe39cee823bb74f723f36f70399123f439e9b20", - "sha256:dbbb2379c19ed6042e8f11f2a2c66d39cceb8aeace421bfc29d085d93eda3689", - "sha256:e3a057b7a64f1222b56e47bcff5e4b94c4f61faac04c7c4ecb1985e18caa3994", - "sha256:e9f45bd5b92c7974e59bcd2dcc8631a6b6cc380a904725fce7bc08872e691615" + "sha256:06a0d7ba600ce0b2d2fe2e78453a470b5a6e000a985dd4a4e54e436cc36b0e97", + "sha256:240097ff019d7c70a4922b6869d8a86407758333f02203e0fc6ff79c5dcede76", + "sha256:4f4b913ca1a7319b33cfb1369e91e50354d6f07a135f3b901aca02aa95940bd2", + "sha256:69f00dca373f240f842b2931fb2c7e14ddbacd1397d57157a9b005a6a9942648", + "sha256:73f099454b799e05e5ab51423c7bcf361c58d3206fa7b0d555426b1f4d9a3eaf", + "sha256:74809a57b329d6cc0fdccee6318f44b9b8649961fa73144a98735b0aaf029f1f", + "sha256:7739fc0fa8205b3ee8808aea45e968bc90082c10aef6ea95e855e10abf4a37b2", + "sha256:95f71d2af0ff4227885f7a6605c37fd53d3a106fcab511b8860ecca9fcf400ee", + "sha256:b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d", + "sha256:cc8955cfbfc7a115fa81d85284ee61147059a753344bc51098f3ccd69b0d7e0c", + "sha256:d13155f591e6fcc1ec3b30685d50bf0711574e2c0dfffd7644babf8b5102ca1a" ], - "version": "==5.3" + "version": "==5.3.1" + }, + "requests": { + "hashes": [ + "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" }, "ruamel.yaml": { "hashes": [ "sha256:0962fd7999e064c4865f96fb1e23079075f4a2a14849bcdc5cdba53a24f9759b", "sha256:099c644a778bf72ffa00524f78dd0b6476bca94a1da344130f4bf3381ce5b954" ], + "markers": "python_version >= '3.7'", "version": "==0.16.10" }, "ruamel.yaml.clib": { @@ -402,33 +638,94 @@ "markers": "platform_python_implementation == 'CPython' and python_version < '3.9'", "version": "==0.2.0" }, + "selinux": { + "hashes": [ + "sha256:820adcf1b4451c9cc7759848797703263ba0eb6a4cad76d73548a9e0d57b7926", + "sha256:d435f514e834e3fdc0941f6a29d086b80b2ea51b28112aee6254bd104ee42a74" + ], + "markers": "sys_platform == 'linux'", + "version": "==0.2.1" + }, + "sh": { + "hashes": [ + "sha256:6f792e45b45d039b423081558904981e8ab49572b0c38009fcc65feaab06bcda", + "sha256:97a3d2205e3c6a842d87ebbc9ae93acae5a352b1bc4609b428d0fd5bb9e286a3" + ], + "version": "==1.13.1" + }, + "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": { "hashes": [ - "sha256:236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a", - "sha256:8f3cd2e254d8f793e7f3d6d9df77b92252b52637291d0f0da013c76ea2724b6c" + "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", + "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" ], - "version": "==1.14.0" + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", + "version": "==1.15.0" + }, + "tabulate": { + "hashes": [ + "sha256:ac64cb76d53b1231d364babcd72abbb16855adac7de6665122f97b593f1eb2ba", + "sha256:db2723a20d04bcda8522165c73eea7c300eda74e0ce852d9022e0159d7895007" + ], + "version": "==0.8.7" + }, + "text-unidecode": { + "hashes": [ + "sha256:1311f10e8b895935241623731c2ba64f4c455287888b18189350b67134a822e8", + "sha256:bad6603bb14d279193107714b288be206cac565dfa49aa5b105294dd5c4aab93" + ], + "version": "==1.3" }, "toml": { "hashes": [ - "sha256:229f81c57791a41d65e399fc06bf0848bab550a9dfd5ed66df18ce5f05e73d5c", - "sha256:235682dd292d5899d361a811df37e04a8828a5b1da3115886b73cf81ebc9100e" + "sha256:926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f", + "sha256:bda89d5935c2eac546d648028b9901107a595863cb36bae0c73ac804a9b4ce88" + ], + "version": "==0.10.1" + }, + "tree-format": { + "hashes": [ + "sha256:a538523aa78ae7a4b10003b04f3e1b37708e0e089d99c9d3b9e1c71384c9a7f9", + "sha256:b5056228dbedde1fb81b79f71fb0c23c98e9d365230df9b29af76e8d8003de11" ], - "version": "==0.10.0" + "version": "==0.1.2" + }, + "urllib3": { + "hashes": [ + "sha256:91056c15fa70756691db97756772bb1eb9678fa585d9184f24534b100dc60f4a", + "sha256:e7983572181f5e1522d9c98453462384ee92a0be7fac5f1413a1e35c56cc0461" + ], + "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.10" }, "virtualenv": { "hashes": [ - "sha256:30ea90b21dabd11da5f509710ad3be2ae47d40ccbc717dfdd2efe4367c10f598", - "sha256:4a36a96d785428278edd389d9c36d763c5755844beb7509279194647b1ef47f1" + "sha256:7b54fd606a1b85f83de49ad8d80dbec08e983a2d2f96685045b262ebc7481ee5", + "sha256:8cd7b2a4850b003a11be2fc213e206419efab41115cc14bca20e69654f2ac08e" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==20.0.30" + }, + "websocket-client": { + "hashes": [ + "sha256:0fc45c961324d79c781bab301359d5a1b00b13ad1b10415a4780229ef71a5549", + "sha256:d735b91d6d1692a6a181f2a8c9e0238e5f6373356f561bb9dc4c7af36f452010" ], - "version": "==20.0.7" + "version": "==0.57.0" }, - "zipp": { + "yamllint": { "hashes": [ - "sha256:12248a63bbdf7548f89cb4c7cda4681e537031eda29c02ea29674bc6854460c2", - "sha256:7c0f8e91abc0dc07a5068f315c52cb30c66bfbc581e5b50704c8a2f6ebae794a" + "sha256:40b68de6bacdccec1585dbd54072731b10da7fc2f9cfd96517a71f066208b61f", + "sha256:ad3b0d30317dca005d7af99ff27248d459cae2d931a2ff06a134b67bcd405b30" ], - "version": "==3.0.0" + "version": "==1.24.2" } } } diff --git a/README.md b/README.md index 3cee553..266954e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ # dev_setup -[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fartis3n%2Fdev-setup%2Fbadge&style=flat)](https://actions-badge.atrox.dev/artis3n/dev-setup/goto) +[![Build Status](https://github.com/artis3n/dev-setup/workflows/Ansible/badge.svg)](https://github.com/artis3n/dev-setup/workflows/Ansible/badge.svg) +![GitHub Pipenv locked Python version](https://img.shields.io/github/pipenv/locked/python-version/artis3n/dev-setup) diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index 363c753..0000000 --- a/Vagrantfile +++ /dev/null @@ -1,20 +0,0 @@ -Vagrant.configure("2") do |config| - config.vm.box = "ubuntu/disco64" - config.vm.hostname = "ansible-cow" - - config.vm.provider "virtualbox" do |v| - v.name = "ansible-cow" - v.memory = 2048 - v.cpus = 2 - end - - config.ssh.insert_key = false - - config.vm.provision "ansible" do |ansible| - ansible.verbose = true - ansible.playbook = "main.yml" - ansible.galaxy_role_file = "requirements.yml" - ansible.vault_password_file = ".vault_pass" - # ansible.ask_become_pass = true - end - end diff --git a/files/secrets-example.yml b/files/secrets-example.yml deleted file mode 100644 index 4c8ee53..0000000 --- a/files/secrets-example.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- - -gpg_pass: password for the GPG key -keyname: name of the GPG key diff --git a/files/systemd/kbd-color.service.j2 b/files/systemd/kbd-color.service.j2 index eb16821..0c4cc47 100644 --- a/files/systemd/kbd-color.service.j2 +++ b/files/systemd/kbd-color.service.j2 @@ -2,13 +2,10 @@ Description=System76 keyboard backlight [Service] -Type=Simple +Type=oneshot ExecStartPre=/bin/sh -c "echo {{ keyboard_color.left }} > /sys/class/leds/system76::kbd_backlight/color_left" ExecStart=/bin/sh -c "echo {{ keyboard_color.center }} > /sys/class/leds/system76::kbd_backlight/color_center" ExecStartPost=/bin/sh -c "echo {{ keyboard_color.right }} > /sys/class/leds/system76::kbd_backlight/color_right" [Install] WantedBy=multi-user.target - -# FIXME: remove -# /etc/systemd/system/kbd-color.service diff --git a/files/vars.yml b/files/vars.yml index af37f2f..2360a5b 100644 --- a/files/vars.yml +++ b/files/vars.yml @@ -1,10 +1,10 @@ ---- - os_short: linux_amd64 -install_dir: "{{ ansible_env.HOME }}/.install_deps" +default_home_dir: '/home/{{ ansible_user }}' +home_dir: "{{ lookup('env', 'ANSIBLE_HOME_DIR') | default(default_home_dir, true) }}" +install_dir: '{{ home_dir }}/.install_deps' -email: dev@quantummadness.com +email: dev@artis3nal.com handle: Artis3n zsh_plugins: @@ -18,118 +18,101 @@ zsh_plugins: - rvm - sudo - systemd - - vagrant - vscode - web-search - wd - zsh-syntax-highlighting - zsh-autosuggestions - - poetry -gpg_comment: Dev Key +zsh_custom_plugins: + - repo: https://github.com/zsh-users/zsh-syntax-highlighting.git + dest: '{{ home_dir }}/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting' + - repo: https://github.com/zsh-users/zsh-autosuggestions + dest: '{{ home_dir }}/.oh-my-zsh/custom/plugins/zsh-autosuggestions' apt_dependencies: + - gnupg2 - python3-apt - + - python3-pexpect apt_repos: - - ansible/ansible - - nextcloud-devs/client - + - dysfunctionalprogramming/minisign apt_packages: - aptitude + - apt-transport-https + - ca-certificates - curl - - vim - - gnome-tweak-tool - firefox - - golang + - flameshot + - flatpak + - fonts-powerline - git + - gnome-tweak-tool + - golang + - jq + - libssl-dev + - magic-wormhole + - minisign + - nodejs + - nvme-cli + - openssl + - openvpn - postgresql - postgresql-contrib - - pgadmin3 - - apt-transport-https - - ca-certificates + - powertop + - redshift-gtk + - rng-tools5 + - ruby-full - software-properties-common + - systemd - texlive-full - - openvpn - - openssl - - libssl-dev + - tlp + - tlp-rdw + - vim + - wget - zsh - - nextcloud-client - - virtualbox - - deja-dup - - vagrant - - gnome-shell-extension-appindicator - - shellcheck - - jq - - awscli - -pentest_packages: - - sqlmap - - nmap - - nikto - - steghide - - exiftool - - foremost - - binwalk - - volatility - - p7zip - - hexedit - - hashcat - - gdb - - wireshark - - tshark - - radare2 - - remmina -jabba_install_script: jabba.install.sh -java_version: 1.13 - -keybase_url: https://prerelease.keybase.io/keybase_amd64.deb -keybase_deb: keybase_amd64.deb - -nvm_install_script: nvm.install.sh -node_version: 12.12.0 - -calibre_url: https://download.calibre-ebook.com/linux-installer.sh +flatpak_applications: + - com.bitwarden.desktop + - com.getpostman.Postman + - com.slack.Slack + - com.spotify.Client + - com.valvesoftware.Steam + - org.gnome.gedit + - org.signal.Signal + - com.calibre_ebook.calibre + - us.zoom.Zoom + - net.xmind.ZEN jetbrains_toolbox: jetbrains-toolbox.tar.gz -jetbrains_toolbox_url: https://data.services.jetbrains.com/products/download?platform=linux&code=TBA - -vmware_url: https://www.vmware.com/go/getworkstation-linux +jetbrains_toolbox_url: 'https://data.services.jetbrains.com/products/download?platform=linux&code=TBA' -ruby_version: 2.6.5 -rvm_repo: rael-gc/rvm -rvm_package: rvm - -rvm_config_list: - - { regexp: 'rvm_silence_path_mismatch_check_flag', line: 'rvm_silence_path_mismatch_check_flag=1' } - - { regexp: 'rvm_autoupdate_flag', line: 'rvm_autoupdate_flag=2' } +sdkman_install_script: sdkman.sh +sdkman_java_version: '14.0.2.hs-adpt' ssh_keypair: filename: id_ed25519 type: ed25519 - comment: dev@quantummadness.com + comment: dev@artis3nal.com -gpg_packages: - - gnupg2 - - rng-tools5 - -# https://www.color-hex.com/color-palettes/ keyboard_color: left: a8383b center: aaa939 right: 2e4372 +vmware_url: https://www.vmware.com/go/getworkstation-linux + docker_apt_dependencies: - apt-transport-https - ca-certificates - software-properties-common + - gnupg-agent + - curl +docker_gpgkey_url: https://download.docker.com/linux/ubuntu/gpg +docker_gpgkey_fingerprint: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88 docker_apt_arch: amd64 -docker_apt_repo: deb [arch={{ docker_apt_arch }}] https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} stable -docker_apt: docker-ce - -john_jumbo_branch: bleeding-jumbo - -wine_packages: - - winehq-stable - - winetricks +docker_apt_repo: >- + deb [arch={{ docker_apt_arch }}] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable +docker_apt: + - docker-ce + - docker-ce-cli + - containerd.io diff --git a/handlers/handlers.yml b/handlers/handlers.yml index c47d033..88439d1 100644 --- a/handlers/handlers.yml +++ b/handlers/handlers.yml @@ -1,7 +1,16 @@ --- -- name: Keybase Install - command: /usr/bin/run_keybase +- name: Clean up apt + become: yes + apt: + autoremove: yes + autoclean: yes + +- name: Run keyboard lights + become: yes + systemd: + name: kbd-color.service + state: started - name: Restart Docker become: yes diff --git a/inventory b/inventory index 6caa952..28a1209 100644 --- a/inventory +++ b/inventory @@ -1 +1,5 @@ -local.machine ansible_host=127.0.0.1 +oryx.local ansible_host=127.0.0.1 ansible_user=artis3n +# lemur.local ansible_host=127.0.0.1 ansible_user=artis3n + +[vmware] +oryx.local diff --git a/main.yml b/main.yml index 751aff3..3a15fe7 100644 --- a/main.yml +++ b/main.yml @@ -1,95 +1,68 @@ ---- - name: All Tasks hosts: all connection: local gather_facts: yes vars_files: - files/vars.yml - - files/secrets.yml - + collections: + - artis3n.github tasks: - name: Setup | Scripts folder file: - path: "{{ install_dir }}" + path: '{{ install_dir }}' state: directory mode: 0755 - - import_tasks: tasks/apt.yml - become: yes - tags: apt + - import_tasks: tasks/packages.yml + tags: packages - import_tasks: tasks/terminal.yml tags: terminal + # - import_role: + # name: artis3n.tailscale + # vars: + # tailscale_auth_key: !vault | + # $ANSIBLE_VAULT;1.1;AES256 + # 32313231643962663130656134646639303633316464636262326334323161323232376230653433 + # 3465633637663531333136663430646531393064623030630a383338396537383734343539363466 + # 62373533616466633535323530376438323562363263363063373834303963393065363334653937 + # 3363353464343333350a333965353431396163653437313731313364363439313432666236626430 + # 33316636346631636264333734323935646533323736303966333036376362653439 + - import_tasks: tasks/java.yml tags: - language - java - - import_tasks: tasks/node.yml - tags: - - language - - node - - - import_tasks: tasks/ruby.yml - tags: - - language - - ruby - - import_tasks: tasks/git.yml tags: git - - import_tasks: tasks/vagrant.yml - tags: vagrant - - import_tasks: tasks/terraform.yml tags: terraform - - import_tasks: tasks/cloudgoat.yml - tags: cloudgoat - - import_tasks: tasks/docker.yml tags: docker + - name: Role | Install Visual Studio Code + import_role: + name: gantsign.visual-studio-code + vars: + users: + - username: '{{ ansible_user }}' + visual_studio_code_extensions: + - Shan.code-settings-sync + - import_tasks: tasks/applications/jetbrains.yml tags: - applications - jetbrains - - import_tasks: tasks/applications/vmware.yml - tags: - - applications - - vmware - - - import_tasks: tasks/applications/calibre.yml - tags: - - applications - - calibre - - - import_tasks: tasks/applications/keybase.yml - tags: - - applications - - keybase - - - import_tasks: tasks/gpg.yml - tags: gpg - - import_tasks: tasks/ssh.yml tags: ssh - - import_tasks: tasks/pentest.yml - tags: pentest - - - import_tasks: tasks/wine.yml - tags: wine - - roles: - - role: gantsign.visual-studio-code - users: - - username: "{{ lookup('env', 'USER') }}" - visual_studio_code_extensions: - - Shan.code-settings-sync - - role: artis3n.bitwarden_app + - import_tasks: tasks/popos.yml + tags: popos handlers: - import_tasks: handlers/handlers.yml diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml new file mode 100644 index 0000000..8d2bb14 --- /dev/null +++ b/molecule/default/converge.yml @@ -0,0 +1,48 @@ +- name: Converge + hosts: all + gather_facts: 'yes' + vars_files: + - ../../files/vars.yml + collections: + - artis3n.github + tasks: + - name: Setup | Scripts folder + file: + path: '{{ install_dir }}' + state: directory + mode: 0755 + + - import_tasks: ../../tasks/packages.yml + become: 'yes' + tags: apt + + - import_tasks: ../../tasks/terminal.yml + tags: terminal + + - import_tasks: ../../tasks/java.yml + tags: + - language + - java + + - import_tasks: ../../tasks/git.yml + tags: git + + - import_tasks: ../../tasks/terraform.yml + tags: terraform + + - import_tasks: ../../tasks/docker.yml + tags: docker + + - import_tasks: ../../tasks/applications/jetbrains.yml + tags: + - applications + - jetbrains + + - import_tasks: ../../tasks/ssh.yml + tags: ssh + + - import_tasks: ../../tasks/popos.yml + tags: popos + + handlers: + - import_tasks: ../../handlers/handlers.yml diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml new file mode 100644 index 0000000..5911c84 --- /dev/null +++ b/molecule/default/molecule.yml @@ -0,0 +1,42 @@ +dependency: + name: galaxy + options: + role-file: requirements.yml + requirements-file: requirements.yml +driver: + name: docker +lint: | + set -e + yamllint . + ansible-lint +platforms: + - name: instance + image: 'geerlingguy/docker-ubuntu2004-ansible:latest' + command: '/lib/systemd/systemd' + pre_build_image: true + volumes: + - '/sys/fs/cgroup:/sys/fs/cgroup:ro' + privileged: true +provisioner: + name: ansible + options: + vault-id: ../../.vault_pass + inventory: + host_vars: + instance: + ansible_user: root + env: + ANSIBLE_HOME_DIR: /root +verifier: + name: ansible +scenario: + name: default + test_sequence: + - dependency + - lint + - destroy + - syntax + - create + - converge + - idempotence + - destroy diff --git a/requirements.yml b/requirements.yml index 4c3c869..9e09b14 100644 --- a/requirements.yml +++ b/requirements.yml @@ -1,7 +1,5 @@ -- src: gantsign.visual-studio-code - users: - - username: "{{ lookup('env', 'USER') }}" - visual_studio_code_extensions: - - Shan.code-settings-sync - -- src: artis3n.bitwarden_app +roles: + - src: gantsign.visual-studio-code + - src: artis3n.tailscale +collections: + - name: artis3n.github diff --git a/tasks/applications/calibre.yml b/tasks/applications/calibre.yml deleted file mode 100644 index 734762e..0000000 --- a/tasks/applications/calibre.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- - -- name: Applications | Calibre | Download - get_url: - url: "{{ calibre_url }}" - dest: "{{ install_dir }}/calibre_installer.sh" - mode: 0764 - register: calibre_installer - -- name: Applications | Calibre | Install - become: yes - command: sh {{ calibre_installer.dest }} - args: - creates: /usr/bin/calibre diff --git a/tasks/applications/dropbox.yml b/tasks/applications/dropbox.yml new file mode 100644 index 0000000..e69de29 diff --git a/tasks/applications/jetbrains.yml b/tasks/applications/jetbrains.yml index a813a34..1891ff1 100644 --- a/tasks/applications/jetbrains.yml +++ b/tasks/applications/jetbrains.yml @@ -10,8 +10,8 @@ - name: Applications | Jetbrains Toolbox | Un-package unarchive: src: "{{ toolbox_app.dest }}" - dest: "{{ install_dir }}/" remote_src: yes + dest: "{{ install_dir }}/" when: toolbox_app.changed # noqa 503 - name: Applications | Jetbrains Toolbox | Locate installer @@ -28,4 +28,4 @@ command: ./{{ toolbox_installer.stdout }}/jetbrains-toolbox args: chdir: "{{ install_dir }}" - creates: "{{ ansible_env.HOME }}/.local/share/applications/jetbrains-toolbox.desktop" + creates: '{{ home_dir }}/.local/share/applications/jetbrains-toolbox.desktop' diff --git a/tasks/applications/keybase.yml b/tasks/applications/keybase.yml deleted file mode 100644 index 416865a..0000000 --- a/tasks/applications/keybase.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- - -- name: Applications | Keybase | Check for existence - stat: - path: /usr/bin/keybase - register: keybase_binary - -- name: Applications | Keybase | All actions - block: - - name: Applications | Keybase | Download - get_url: - url: "{{ keybase_url }}" - dest: "{{ install_dir }}/{{ keybase_deb }}" - mode: 0644 - - - name: Applications | Keybase | Install - become: yes - apt: - deb: "{{ install_dir }}/{{ keybase_deb }}" - notify: Keybase Install - - when: not keybase_binary.stat.exists diff --git a/tasks/applications/vmware.yml b/tasks/applications/vmware.yml index 98f2278..76270d1 100644 --- a/tasks/applications/vmware.yml +++ b/tasks/applications/vmware.yml @@ -10,8 +10,6 @@ url: "{{ vmware_url }}" dest: "{{ install_dir }}/vmware.bundle" mode: 0764 - async: 1800 - poll: 30 when: not vmware_app.stat.exists register: vmware_installer diff --git a/tasks/apt.yml b/tasks/apt.yml deleted file mode 100644 index e8b35fe..0000000 --- a/tasks/apt.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- - -- name: Apt | Install dependencies - apt: - name: "{{ apt_dependencies }}" - update_cache: yes - state: present - -- name: Apt | Add Repositories - apt_repository: - repo: ppa:{{ item }} - state: present - with_items: "{{ apt_repos }}" - -- name: Apt | Upgrade packages - This will take a long time - apt: - upgrade: full - update_cache: yes - async: 3600 - poll: 60 - -- name: Apt | Install packages - This will take a long time - apt: - name: "{{ apt_packages }}" - state: present - async: 3600 - poll: 60 - -- name: Apt | Clean up - apt: - autoremove: yes - autoclean: yes diff --git a/tasks/cloudgoat.yml b/tasks/cloudgoat.yml deleted file mode 100644 index 9163c45..0000000 --- a/tasks/cloudgoat.yml +++ /dev/null @@ -1,45 +0,0 @@ ---- - -- name: Cloudgoat | Ensure repo - file: - path: "{{ install_dir }}/cloudgoat" - state: directory - register: cloudgoat_repo - -- name: Cloudgoat | Download - command: git clone https://github.com/RhinoSecurityLabs/cloudgoat.git {{ cloudgoat_repo.path }} - args: - warn: False - creates: "{{ cloudgoat_repo.path }}/cloudgoat.py" - -- name: Cloudgoat | Install dependencies - command: "{{ lookup('env', 'HOME') }}/.local/bin/pipenv install --three -r ./core/python/requirements.txt" - args: - chdir: "{{ install_dir }}/cloudgoat" - creates: "{{ install_dir }}/cloudgoat/Pipfile.lock" - -- name: Cloudgoat | Make executable - file: - path: "{{ install_dir }}/cloudgoat/cloudgoat.py" - mode: u+x - -- name: Cloudgoat | Get python path - command: "{{ lookup('env', 'HOME') }}/.local/bin/pipenv --py" - args: - chdir: "{{ install_dir }}/cloudgoat" - register: cloudgoat_python_exec - changed_when: false - -- name: Cloudgoat | Get venv path - command: "{{ lookup('env', 'HOME') }}/.local/bin/pipenv --venv" - args: - chdir: "{{ install_dir }}/cloudgoat" - register: cloudgoat_venv - changed_when: false - -- name: Cloudgoat | Add to profile - lineinfile: - path: "{{ lookup('env', 'HOME') }}/.zshrc" - regexp: alias cloudgoat - line: alias cloudgoat="{{ cloudgoat_venv.stdout }}/bin/python {{ install_dir }}/cloudgoat/cloudgoat.py" - state: present diff --git a/tasks/docker.yml b/tasks/docker.yml index be61216..c454f90 100644 --- a/tasks/docker.yml +++ b/tasks/docker.yml @@ -1,29 +1,26 @@ ---- - - name: Docker | Install apt dependencies become: yes apt: - name: "{{ docker_apt_dependencies }}" + name: '{{ docker_apt_dependencies }}' state: present - name: Docker | Add apt-key become: yes apt_key: - url: https://download.docker.com/linux/ubuntu/gpg - id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88 + url: '{{ docker_gpgkey_url }}' + id: '{{ docker_gpgkey_fingerprint }}' state: present - name: Docker | Add repository - become: yes + become: 'yes' apt_repository: - repo: "{{ docker_apt_repo }}" + repo: '{{ docker_apt_repo }}' state: present - update_cache: true - name: Docker | Install become: yes apt: - name: "{{ docker_apt }}" + name: '{{ docker_apt }}' state: present notify: Restart Docker @@ -36,8 +33,8 @@ - name: Docker | Check if in group shell: | - set -o pipefail - id -nG | grep docker + set -o pipefail + id -nG | grep docker args: executable: /bin/bash changed_when: false @@ -46,6 +43,6 @@ - name: Docker | Add user to Docker group become: yes - command: gpasswd -a {{ ansible_env.USER }} docker + command: 'usermod -aG docker {{ ansible_user }}' when: in_docker_group.rc != 0 notify: Docker user added diff --git a/tasks/git.yml b/tasks/git.yml index c784971..b5ec901 100644 --- a/tasks/git.yml +++ b/tasks/git.yml @@ -1,39 +1,58 @@ ---- - - name: Git | Set config git_config: - name: "{{ item.name }}" - value: "{{ item.value }}" + name: '{{ item.name }}' + value: '{{ item.value }}' scope: global - with_items: - - { name: user.email, value: "{{ email }}" } - - { name: user.name, value: "{{ handle }}" } - - { name: push.default, value: simple } - - { name: alias.ci, value: commit } - - { name: alias.s, value: status } - - { name: alias.br, value: branch } - - { name: alias.co, value: checkout } - - { name: alias.get, value: "pull --prune" } - - { name: alias.list, value: "config --get-regexp alias" } - - { name: alias.save, value: "stash save" } + loop: + - name: user.email + value: '{{ email }}' + - name: user.name + value: '{{ handle }}' + - name: push.default + value: simple + - name: alias.ci + value: commit + - name: alias.s + value: status + - name: alias.br + value: branch + - name: alias.co + value: checkout + - name: alias.get + value: pull --prune + - name: alias.list + value: config --get-regexp alias + - name: alias.save + value: stash save - name: Git | Hub | Get latest version set_fact: - hub_version: "{{ lookup('artis3n.github_version.github_version', 'github/hub') }}" + hub_version: '{{ lookup(''artis3n.github.latest_release'', ''github/hub'') }}' - name: Git | Hub | Download get_url: - url: https://github.com/github/hub/releases/download/{{ hub_version }}/hub-linux-amd64-{{ hub_version[1:] }}.tgz - dest: "{{ install_dir }}/hub-linux-amd64-{{ hub_version[1:] }}.tgz" + url: >- + https://github.com/github/hub/releases/download/{{ hub_version + }}/hub-linux-amd64-{{ hub_version[1:] }}.tgz + dest: '{{ install_dir }}/hub-linux-amd64-{{ hub_version[1:] }}.tgz' - name: Git | Hub | Unarchive unarchive: - src: "{{ install_dir }}/hub-linux-amd64-{{ hub_version[1:] }}.tgz" - dest: "{{ install_dir }}/" - creates: "{{ install_dir }}/hub-linux-amd64-{{ hub_version[1:] }}/bin/hub" + src: '{{ install_dir }}/hub-linux-amd64-{{ hub_version[1:] }}.tgz' + remote_src: yes + dest: '{{ install_dir }}/' + creates: '{{ install_dir }}/hub-linux-amd64-{{ hub_version[1:] }}/bin/hub' + +- name: Git | Hub | Ensure local bin + file: + path: '{{ item }}' + state: directory + loop: + - '{{ home_dir }}/.local' + - '{{ home_dir }}/.local/bin' - name: Git | Hub | Add to local bin - copy: - src: "{{ install_dir }}/hub-linux-amd64-{{ hub_version[1:] }}/bin/hub" - dest: "{{ lookup('env', 'HOME') }}/.local/bin/hub" - mode: 0751 + file: + src: '{{ install_dir }}/hub-linux-amd64-{{ hub_version[1:] }}/bin/hub' + dest: '{{ home_dir }}/.local/bin/hub' + state: link diff --git a/tasks/gpg.yml b/tasks/gpg.yml deleted file mode 100644 index 00f12c7..0000000 --- a/tasks/gpg.yml +++ /dev/null @@ -1,51 +0,0 @@ ---- - -- name: GPG | Ensure Dependencies - become: yes - apt: - name: "{{ gpg_packages }}" - state: present - -- name: GPG | Format parameter file - template: - src: files/gpg/keygen.j2 - dest: "{{ install_dir }}/keygen" - register: gpgconfig - -- name: GPG | Check for existing key - shell: gpg2 --list-secret-keys | grep '{{ handle }}' - changed_when: false - ignore_errors: true - register: gpgkey - -- name: GPG | Generate key - command: gpg2 --batch --full-generate-key {{ gpgconfig.dest }} - args: - chdir: "{{ install_dir }}" - when: not gpgkey.stdout - register: gpggen - -- name: GPG | Import key - command: gpg2 --import {{ keyname }}.pub - args: - chdir: "{{ install_dir }}" - when: not gpgkey.stdout - -- name: GPG | Retrieve GPG Key ID - shell: | - set -o pipefail - gpg2 --list-secret-keys --keyid-format LONG | grep -B 2 'Artis3n' | head -n 1 | tr -d ' ' | cut -c12- | rev | cut -c15- | rev - args: - executable: /bin/bash - changed_when: false - register: gpg_keyid - -- name: GPG | Add to git config - git_config: - name: "{{ item.name }}" - value: "{{ item.value }}" - scope: global - with_items: - - { name: commit.gpgsign, value: 'true' } - - { name: user.signingkey, value: "{{ gpg_keyid.stdout }}" } - - { name: gpg.program, value: gpg2 } diff --git a/tasks/java.yml b/tasks/java.yml index 9eee358..99444da 100644 --- a/tasks/java.yml +++ b/tasks/java.yml @@ -1,24 +1,26 @@ ---- - -- name: Java | Get Jabba install script +- name: Java | Get SDKMan install script get_url: - url: https://github.com/shyiko/jabba/raw/master/install.sh - dest: "{{ install_dir }}/{{ jabba_install_script }}" - mode: 0764 - register: jabba_script + url: 'https://get.sdkman.io' + dest: '{{ install_dir }}/{{ sdkman_install_script }}' + mode: 0755 + register: sdkman_script -- name: Java | Install Jabba - command: bash {{ jabba_script.dest }} +- name: Java | Install SDKMan + command: 'bash {{ sdkman_script.dest }}' args: - creates: "{{ lookup('env', 'HOME') }}/.jabba/bin/jabba" + creates: '{{ home_dir }}/.sdkman/bin/sdkman-init.sh' - name: Java | Add to profile lineinfile: - path: "{{ lookup('env', 'HOME') }}/.zshrc" - line: "[ -s '/home/{{ lookup('env', 'USER') }}/.jabba/jabba.sh' ] && source '/home/{{ lookup('env', 'USER') }}/.jabba/jabba.sh'" + path: '{{ home_dir }}/.zshrc' + line: "{{ item }}" state: present + loop: + - 'export SDKMAN_DIR="{{ home_dir }}/.sdkman"' + - '[[ -s "{{ home_dir }}/.sdkman/bin/sdkman-init.sh" ]] && source "{{ home_dir }}/.sdkman/bin/sdkman-init.sh"' - name: Java | Install JDK - command: "{{ lookup('env', 'HOME') }}/.jabba/bin/jabba install openjdk@{{ java_version }}" + shell: "source {{ home_dir }}/.zshrc; sdk install java {{ sdkman_java_version | quote }}" args: - creates: "{{ lookup('env', 'HOME') }}/.jabba/jdk/openjdk@{{ java_version }}" + executable: /bin/zsh + creates: '{{ home_dir }}/.sdkman/candidates/java/{{ sdkman_java_version }}/bin/java' diff --git a/tasks/node.yml b/tasks/node.yml deleted file mode 100644 index 9828e8c..0000000 --- a/tasks/node.yml +++ /dev/null @@ -1,51 +0,0 @@ ---- - -- name: Node | Set nvm version - set_fact: - nvm_version: "{{ lookup('artis3n.github_version.github_version', 'nvm-sh/nvm')[1:] }}" - -- name: Node | Download nvm - get_url: - url: https://raw.githubusercontent.com/nvm-sh/nvm/v{{ nvm_version }}/install.sh - dest: "{{ install_dir }}/{{ nvm_install_script }}" - mode: 0764 - -- name: Node | Install nvm - command: bash "{{ install_dir }}/{{ nvm_install_script }}" - args: - creates: "{{ lookup('env', 'HOME') }}/.nvm/nvm.sh" - -- name: Node | Add nvm to profiles - blockinfile: - path: "{{ lookup('env', 'HOME') }}/.zshrc" - block: | - export NVM_DIR="$HOME/.nvm" - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - - autoload -U add-zsh-hook - load-nvmrc() { - local node_version="$(nvm version)" - local nvmrc_path="$(nvm_find_nvmrc)" - - if [ -n "$nvmrc_path" ]; then - local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")") - - if [ "$nvmrc_node_version" = "N/A" ]; then - nvm install - elif [ "$nvmrc_node_version" != "$node_version" ]; then - nvm use - fi - elif [ "$node_version" != "$(nvm version default)" ]; then - echo "Reverting to nvm default version" - nvm use default - fi - } - add-zsh-hook chpwd load-nvmrc - load-nvmrc - state: present - -- name: Node | Install Node - shell: source {{ lookup('env', 'HOME') }}/.nvm/nvm.sh && nvm install {{ node_version }} - args: - creates: "{{ lookup('env', 'HOME') }}/.nvm/versions/node/v{{ node_version }}/bin/node" - executable: /bin/bash diff --git a/tasks/packages.yml b/tasks/packages.yml new file mode 100644 index 0000000..7d5019b --- /dev/null +++ b/tasks/packages.yml @@ -0,0 +1,50 @@ +- name: Packages | Apt | Install dependencies + become: yes + apt: + name: '{{ apt_dependencies }}' + update_cache: 'yes' + state: present + notify: Clean up apt + +- name: Packages | Apt | Add repositories + become: yes + apt_repository: + repo: 'ppa:{{ item }}' + state: present + with_items: '{{ apt_repos }}' + +- name: Packages | Apt | Upgrade packages - Will take a long time + become: yes + apt: + upgrade: full + update_cache: 'yes' + notify: Clean up apt + +- name: Packages | Apt | Install packages - Will take a long time + become: yes + apt: + name: '{{ apt_packages }}' + state: present + register: apt_install + notify: Clean up apt + +- name: Packages | Flatpak | Check for flathub + shell: | + set -o pipefail + flatpak remotes | grep flathub + args: + executable: /bin/bash + changed_when: false + register: flathub_remote + failed_when: flathub_remote.rc > 1 + +- name: Packages | Flatpak | Set up flathub + command: flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo + when: flathub_remote.rc != 0 + +- name: Packages | Flatpak | Install applications + flatpak: + name: "{{ item }}" + method: user + state: present + loop: "{{ flatpak_applications }}" diff --git a/tasks/pentest.yml b/tasks/pentest.yml deleted file mode 100644 index 45a9fef..0000000 --- a/tasks/pentest.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- - -- name: Pentest | Install packages - become: yes - apt: - name: "{{ pentest_packages }}" - state: present - async: 900 - poll: 15 - -- name: Pentest | John | Download - git: - repo: https://github.com/magnumripper/JohnTheRipper.git - version: "{{ john_jumbo_branch }}" - dest: "{{ install_dir }}/john" - -- name: Pentest | John | Build - shell: ./configure && make -s clean && make -sj4 - args: - chdir: "{{ install_dir }}/john/src" - creates: "{{ install_dir }}/john/run/john" - async: 300 - poll: 10 - -- name: Pentest | John | Alias - lineinfile: - path: "{{ lookup('env', 'HOME') }}/.zshrc" - regexp: "^alias john=" - line: 'alias john="{{ install_dir }}/john/run/john"' - state: present diff --git a/tasks/popos.yml b/tasks/popos.yml new file mode 100644 index 0000000..ec0be86 --- /dev/null +++ b/tasks/popos.yml @@ -0,0 +1,21 @@ +--- + +- name: PopOS | Set up keyboard lights service + become: yes + template: + src: ../files/systemd/kbd-color.service.j2 + dest: /etc/systemd/system/kbd-color.service + mode: '0644' + notify: Run keyboard lights + tags: + - molecule-notest + +- name: PopOS | Run keyboard lights service + become: yes + systemd: + name: kbd-color.service + daemon-reload: yes + enabled: yes + notify: Run keyboard lights + tags: + - molecule-notest diff --git a/tasks/ruby.yml b/tasks/ruby.yml deleted file mode 100644 index e111c19..0000000 --- a/tasks/ruby.yml +++ /dev/null @@ -1,35 +0,0 @@ ---- - -- name: Ruby | Add repository - become: yes - apt_repository: - repo: ppa:{{ rvm_repo }} - state: present - -- name: Ruby | Install RVM - become: yes - apt: - name: "{{ rvm_package }}" - state: present - update_cache: yes - -- name: Ruby | Configure rvmrc - lineinfile: - path: "{{ lookup('env', 'HOME') }}/.rvmrc" - regexp: "{{ item.regexp }}" - line: "{{ item.line }}" - state: present - with_items: "{{ rvm_config_list }}" - -- name: Ruby | Check for existing Ruby version - stat: - path: /usr/share/rvm/rubies/ruby-{{ ruby_version }} - register: ruby_path - -- name: Ruby | Install Ruby version - become: yes - command: /usr/share/rvm/bin/rvm install ruby-{{ ruby_version }} - async: 1800 - poll: 30 - args: - creates: /usr/share/rvm/rubies/ruby-{{ ruby_version }}/bin/ruby diff --git a/tasks/ssh.yml b/tasks/ssh.yml index 2978323..525af0d 100644 --- a/tasks/ssh.yml +++ b/tasks/ssh.yml @@ -1,20 +1,18 @@ ---- - - name: SSH | Ensure directory file: - path: "{{ lookup('env', 'HOME') }}/.ssh" + path: '{{ home_dir }}/.ssh' state: directory - name: SSH | Generate key openssh_keypair: - path: "{{ lookup('env', 'HOME') }}/.ssh/{{ ssh_keypair.filename }}" - comment: "{{ ssh_keypair.comment }}" + path: '{{ home_dir }}/.ssh/{{ ssh_keypair.filename }}' + comment: '{{ ssh_keypair.comment }}' state: present - type: "{{ ssh_keypair.type }}" + type: '{{ ssh_keypair.type }}' register: gen_ssh_key - name: SSH | Set default key template: - src: files/ssh/config.j2 - dest: "{{ lookup('env', 'HOME') }}/.ssh/config" + src: ../files/ssh/config.j2 + dest: '{{ home_dir }}/.ssh/config' backup: yes diff --git a/tasks/terminal.yml b/tasks/terminal.yml index 33f55da..e64f618 100644 --- a/tasks/terminal.yml +++ b/tasks/terminal.yml @@ -1,36 +1,84 @@ ---- - - name: Terminal | Install Oh My ZSH shell: sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" args: - creates: "{{ lookup('env', 'HOME') }}/.zshrc" + executable: /bin/bash + creates: '{{ home_dir }}/.zshrc' - name: Terminal | Set Spaceship version set_fact: - spaceship_version: "{{ lookup('artis3n.github_version.github_version', 'denysdovhan/spaceship-prompt') }}" + spaceship_version: "{{ lookup('artis3n.github.latest_release', 'denysdovhan/spaceship-prompt') }}" - name: Terminal | ZSH Spaceship theme + become: yes git: - repo: https://github.com/denysdovhan/spaceship-prompt.git - version: "{{ spaceship_version }}" - dest: "{{ lookup('env', 'HOME') }}/.oh-my-zsh/custom/themes/spaceship-prompt" + repo: 'https://github.com/denysdovhan/spaceship-prompt.git' + version: '{{ spaceship_version }}' + dest: '{{ home_dir }}/.oh-my-zsh/custom/themes/spaceship-prompt' + register: spaceship_repo + +- name: Terminal | Set file permissions + become: yes + file: + path: '{{ home_dir }}/.oh-my-zsh/custom/themes/spaceship-prompt' + state: directory + owner: '{{ ansible_user }}' + group: '{{ ansible_user }}' + recurse: 'yes' + when: spaceship_repo.changed # noqa 503 - name: Terminal | ZSH Spaceship symbolic link + become: yes file: - src: "{{ lookup('env', 'HOME') }}/.oh-my-zsh/custom/themes/spaceship-prompt/spaceship.zsh-theme" - dest: "{{ lookup('env', 'HOME') }}/.oh-my-zsh/custom/themes/spaceship.zsh-theme" + src: '{{ home_dir }}/.oh-my-zsh/custom/themes/spaceship-prompt/spaceship.zsh-theme' + dest: '{{ home_dir }}/.oh-my-zsh/custom/themes/spaceship.zsh-theme' state: link + owner: '{{ ansible_user }}' + group: '{{ ansible_user }}' - name: Terminal | Set Spaceship as the terminal theme + become: yes lineinfile: - path: "{{ lookup('env', 'HOME') }}/.zshrc" - regexp: "^ZSH_THEME=" + path: '{{ home_dir }}/.zshrc' + regexp: ^ZSH_THEME= line: ZSH_THEME="spaceship" state: present +- name: Terminal | Add custom plugins + git: + repo: '{{ item.repo }}' + dest: '{{ item.dest }}' + version: master + loop: '{{ zsh_custom_plugins }}' + - name: Terminal | Add plugins lineinfile: - path: "{{ lookup('env', 'HOME') }}/.zshrc" - regexp: "^plugins=" - line: "plugins=({{ zsh_plugins | join(' ') }})" + path: '{{ home_dir }}/.zshrc' + regexp: ^plugins= + line: 'plugins=({{ zsh_plugins | join('' '') }})' state: present + +- name: Terminal | Add Zsh properties + lineinfile: + path: '{{ home_dir }}/.zshrc' + regexp: ^{{ item.regex }} + line: '{{ item.line }}' + state: present + loop: + - regex: COMPLETION_WAITING_DOTS + line: COMPLETION_WAITING_DOTS='true' + - regex: DISABLE_UNTRACKED_FILES_DIRTY + line: DISABLE_UNTRACKED_FILES_DIRTY='true' + - regex: ~\/\.oh-my-zsh\/custom\/plugins\/zsh-autosuggestions\/zsh-autosuggestions\.zsh + line: source ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh + +- name: Terminal | Set default shell + become: yes + user: + name: "{{ ansible_user }}" + shell: /bin/zsh + +- name: Terminal | Set default editor + become: yes + alternatives: + name: editor + path: /usr/bin/vim diff --git a/tasks/terraform.yml b/tasks/terraform.yml index 4d2d6a7..8055a65 100644 --- a/tasks/terraform.yml +++ b/tasks/terraform.yml @@ -1,55 +1,46 @@ ---- - - name: Terraform | Get latest release set_fact: - terraform_version: "{{ lookup('artis3n.github_version.github_version', 'hashicorp/terraform')[1:] }}" + terraform_version: "{{ lookup('artis3n.github.latest_release', 'hashicorp/terraform')[1:] }}" + +- name: Terraform | Set archive path + set_fact: + terraform_archive_path: '{{ install_dir }}/terraform_{{ terraform_version }}.zip' - name: Terraform | Ensure directory file: - path: "{{ install_dir }}/terraform_{{ terraform_version }}" + path: '{{ install_dir }}/terraform_{{ terraform_version }}' state: directory register: terraform_directory -- name: Terraform | Get hashes - get_url: - url: https://releases.hashicorp.com/terraform/{{ terraform_version }}/terraform_{{ terraform_version }}_SHA256SUMS - dest: "{{ terraform_directory.path }}/SHA256SUMS" - register: terraform_shas_file - changed_when: false - -- name: Terraform | Construct regex - set_fact: - terraform_sha_hash: "{{ '.*\\s\\sterraform_' + (terraform_version | regex_escape()) + '_linux_amd64\\.zip' }}" - -- name: Terraform | Extract sha hash - set_fact: - # https://regex101.com/r/RS94Us/1 - terraform_sha_string: "{{ lookup('file', terraform_shas_file.dest) | regex_findall(terraform_sha_hash) | first }}" +- name: Terraform | Check for download + stat: + path: '{{ terraform_archive_path }}' + register: terraform_archive - name: Terraform | Download get_url: url: https://releases.hashicorp.com/terraform/{{ terraform_version }}/terraform_{{ terraform_version }}_{{ os_short }}.zip - dest: "{{ install_dir }}/terraform_{{ terraform_version }}.zip" - checksum: sha256:{{ terraform_sha_string.split(' ')[0] }} - register: terraform_download + dest: '{{ terraform_archive_path }}' + when: not terraform_archive.stat.exists - name: Terraform | Unarchive unarchive: - src: "{{ terraform_download.dest }}" - dest: "{{ terraform_directory.path }}" + src: '{{ terraform_archive_path }}' remote_src: yes + dest: '{{ terraform_directory.path }}' + creates: '{{ terraform_directory.path }}/terraform' - name: Terraform | Ensure local bin permissions - become: yes + become: 'yes' file: path: /usr/local state: directory - owner: "{{ lookup('env', 'USER') }}" - group: "{{ lookup('env', 'USER') }}" - recurse: yes + owner: '{{ ansible_user }}' + group: '{{ ansible_user }}' + recurse: 'yes' - name: Terraform | Add to local bin - copy: - src: "{{ terraform_directory.path }}/terraform" + file: + src: '{{ terraform_directory.path }}/terraform' dest: /usr/local/bin/terraform - mode: 0755 + state: link diff --git a/tasks/vagrant.yml b/tasks/vagrant.yml deleted file mode 100644 index b23739f..0000000 --- a/tasks/vagrant.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- - -- name: Vagrant | Add to profile - lineinfile: - path: "{{ lookup('env', 'HOME') }}/.zshrc" - regexp: alias vagrant - line: alias vagrant="env -u GEM_HOME -u GEM_PATH vagrant" - state: present diff --git a/tasks/wine.yml b/tasks/wine.yml deleted file mode 100644 index 9f0a0bd..0000000 --- a/tasks/wine.yml +++ /dev/null @@ -1,36 +0,0 @@ ---- - -- name: Wine | Enable i386 architecture - become: yes - lineinfile: - dest: '/var/lib/dpkg/arch' - line: 'i386' - create: True - state: present - register: i386_arch - -- name: Wine | Add public key - become: yes - apt_key: - url: https://dl.winehq.org/wine-builds/winehq.key - state: present - -- name: Wine | Add repo - become: yes - apt_repository: - repo: deb https://dl.winehq.org/wine-builds/ubuntu/ {{ ansible_distribution_release }} main - state: present - register: wine_repo - -- name: Wine | Update cache - become: yes - apt: - update_cache: yes - when: i386_arch.changed or wine_repo.changed # noqa 503 - -- name: Wine | Install packages - become: yes - apt: - name: "{{ wine_packages }}" - state: present - install_recommends: True