-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds support for generating a project which will use Ansible. Creates a base inventory, playbook, and installs the necessary tooling for working within the Ansible ecosystem.
- Loading branch information
Showing
20 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../generic/.devcontainer/devcontainer.json.jinja |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../generic/.editorconfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../generic/CHANGELOG.md.jinja |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
version: "3" | ||
|
||
tasks: | ||
docs: | ||
desc: Start a server which serves the project documentation | ||
cmds: | ||
- mkdocs serve {% if git_provider == 'github' %}--config-file=.github/.mkdocsrc{% endif %} | ||
inventory: | ||
desc: Display the inventory as seen from Ansible in graph form | ||
cmds: | ||
- ansible-inventory --graph | ||
inventory-list: | ||
desc: Display the inventory as seen from Ansible in list form | ||
cmds: | ||
- ansible-inventory --list | ||
lint: | ||
desc: Check the syntax of Ansible playbooks | ||
cmds: | ||
- ansible-lint | ||
run: | ||
desc: Run playbook | ||
cmds: | ||
- ansible-playbook main.yaml | ||
setup: | ||
desc: Install dependencies and setup the project | ||
cmds: | ||
- pre-commit install {%- if git_provider == 'github' %} --config .github/.precommitrc{% endif %} --hook-type pre-commit --hook-type commit-msg | ||
- pip install --user ansible-lint | ||
- ansible-galaxy install -r requirements.yaml | ||
default: | ||
cmds: | ||
- task --list | ||
|
||
silent: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[defaults] | ||
inventory = ./inventory.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
ungrouped: | ||
hosts: | ||
localhost: | ||
ansible_connection: local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
- name: Demo Playbook | ||
hosts: all | ||
tasks: | ||
- name: Debug information | ||
ansible.builtin.debug: | ||
msg: "The hostname is {{ ansible_hostname }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
collections: | ||
- name: ansible.utils | ||
version: 3.0.0 | ||
# roles: | ||
# - name: TBD | ||
# version: TBD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../generic/version.txt.jinja |
1 change: 1 addition & 0 deletions
1
ansible/{% if git_provider == 'github' %}.github{% endif %}/.commitlintrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../generic/{% if git_provider == 'github' %}.github{% endif %}/.commitlintrc |
12 changes: 12 additions & 0 deletions
12
...{% if git_provider == 'github' %}.github{% endif %}/.devcontainer/devcontainer.json.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
{ | ||
"name": "{{project_name}}", | ||
"image": "ghcr.io/jwbennet/project-base-dev-container:2.2.0", | ||
"features": { | ||
// renovate: depType=devcontainerFeature datasource=docker | ||
"ghcr.io/devcontainers-contrib/features/ansible:2.0.17": { | ||
// renovate: depType=devDependencies datasource=github-tags depName=ansible/ansible extractVersion=true | ||
"version": "2.16.3" | ||
} | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
ansible/{% if git_provider == 'github' %}.github{% endif %}/.lintstagedrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../generic/{% if git_provider == 'github' %}.github{% endif %}/.lintstagedrc |
1 change: 1 addition & 0 deletions
1
ansible/{% if git_provider == 'github' %}.github{% endif %}/.mkdocsrc.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../generic/{% if git_provider == 'github' %}.github{% endif %}/.mkdocsrc.jinja |
1 change: 1 addition & 0 deletions
1
ansible/{% if git_provider == 'github' %}.github{% endif %}/.precommitrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../generic/{% if git_provider == 'github' %}.github{% endif %}/.precommitrc |
1 change: 1 addition & 0 deletions
1
ansible/{% if git_provider == 'github' %}.github{% endif %}/.prettierrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../generic/{% if git_provider == 'github' %}.github{% endif %}/.prettierrc |
1 change: 1 addition & 0 deletions
1
ansible/{% if git_provider == 'github' %}.github{% endif %}/renovate.json.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../generic/{% if git_provider == 'github' %}.github{% endif %}/renovate.json.jinja |
1 change: 1 addition & 0 deletions
1
...rovider == 'github' %}.github{% endif %}/workflows/devcontainer-build-and-push.yaml.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../generic/{% if git_provider == 'github' %}.github{% endif %}/workflows/devcontainer-build-and-push.yaml.jinja |
1 change: 1 addition & 0 deletions
1
...e/{% if git_provider == 'github' %}.github{% endif %}/workflows/release-please.yaml.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../generic/{% if git_provider == 'github' %}.github{% endif %}/workflows/release-please.yaml.jinja |
1 change: 1 addition & 0 deletions
1
ansible/{% if git_provider == 'github' %}.github{% endif %}/workflows/renovate.yaml.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../generic/{% if git_provider == 'github' %}.github{% endif %}/workflows/renovate.yaml.jinja |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters