Init ansible workflow
This commit is contained in:
commit
ce54cf1f4c
10 changed files with 149 additions and 0 deletions
114
.gitignore
vendored
Normal file
114
.gitignore
vendored
Normal file
|
@ -0,0 +1,114 @@
|
|||
|
||||
# Created by https://www.gitignore.io/api/python,ansible
|
||||
# Edit at https://www.gitignore.io/?templates=python,ansible
|
||||
|
||||
### Ansible ###
|
||||
*.retry
|
||||
|
||||
### Python ###
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
pip-wheel-metadata/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
# pyenv
|
||||
.python-version
|
||||
|
||||
# pipenv
|
||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||
# install all needed dependencies.
|
||||
#Pipfile.lock
|
||||
|
||||
# celery beat schedule file
|
||||
celerybeat-schedule
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# Mr Developer
|
||||
.mr.developer.cfg
|
||||
.project
|
||||
.pydevproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
|
||||
# End of https://www.gitignore.io/api/python,ansible
|
||||
env/
|
1
README.md
Normal file
1
README.md
Normal file
|
@ -0,0 +1 @@
|
|||
# Infrastructure
|
4
ansible/.ansible-lint
Normal file
4
ansible/.ansible-lint
Normal file
|
@ -0,0 +1,4 @@
|
|||
skip_list:
|
||||
- 305
|
||||
- 401
|
||||
- 301
|
0
ansible/hosts
Normal file
0
ansible/hosts
Normal file
0
ansible/main.yml
Normal file
0
ansible/main.yml
Normal file
3
dev-requirements.txt
Normal file
3
dev-requirements.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
-r requirements.txt
|
||||
ansible-lint==4.2.0
|
||||
yamllint==1.19.0
|
1
requirements.txt
Normal file
1
requirements.txt
Normal file
|
@ -0,0 +1 @@
|
|||
ansible==2.9.2
|
7
scripts/ansible.sh
Executable file
7
scripts/ansible.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
PATH=env/bin:${PATH}
|
||||
|
||||
ansible-playbook -i ansible/hosts ansible/main.yml
|
13
scripts/lint.sh
Executable file
13
scripts/lint.sh
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
PATH=env/bin:${PATH}
|
||||
|
||||
set -x
|
||||
|
||||
yamllint -sc yamllint.yml yamllint.yml ansible/
|
||||
|
||||
ansible-lint ansible/main.yml -p -c ansible/.ansible-lint
|
||||
|
||||
ansible-playbook -i ansible/hosts ansible/main.yml --syntax-check
|
6
yamllint.yml
Normal file
6
yamllint.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
extends: default
|
||||
|
||||
rules:
|
||||
document-start: "disable"
|
||||
line-length:
|
||||
max: 150
|
Loading…
Reference in a new issue