forked from ansible/ansible-creator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
61 changed files
with
1,239 additions
and
64 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
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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# Stuff we don't want prettier to ever to look into | ||
tests/fixtures/collection/testorg/testcol/roles/ | ||
tests/fixtures/project/ansible_project/collections/ansible_collections/project_org/project_repo/roles/run/README.md | ||
tests/fixtures/project/ansible_project/.github/workflows/tests.yml | ||
tests/fixtures/project/ansible_project/collections/ansible_collections/weather/demo/roles/run/README.md |
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
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
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
24 changes: 24 additions & 0 deletions
24
src/ansible_creator/resources/ansible_project/.devcontainer/devcontainer.json
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,24 @@ | ||
{ | ||
"name": "ansible-dev-container-codespaces", | ||
"image": "ghcr.io/ansible/community-ansible-dev-tools-container:latest", | ||
"containerUser": "podman", | ||
"runArgs": [ | ||
"--security-opt", | ||
"seccomp=unconfined", | ||
"--security-opt", | ||
"label=disable", | ||
"--cap-add=SYS_ADMIN", | ||
"--cap-add=SYS_RESOURCE", | ||
"--device", | ||
"/dev/fuse", | ||
"--security-opt", | ||
"apparmor=unconfined", | ||
"--hostname=ansible-dev-container" | ||
], | ||
"updateRemoteUserUID": true, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["redhat.ansible"] | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/ansible_creator/resources/ansible_project/.devcontainer/docker/devcontainer.json
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,24 @@ | ||
{ | ||
"name": "ansible-dev-container-docker", | ||
"image": "ghcr.io/ansible/community-ansible-dev-tools-container:latest", | ||
"containerUser": "podman", | ||
"runArgs": [ | ||
"--security-opt", | ||
"seccomp=unconfined", | ||
"--security-opt", | ||
"label=disable", | ||
"--cap-add=SYS_ADMIN", | ||
"--cap-add=SYS_RESOURCE", | ||
"--device", | ||
"/dev/fuse", | ||
"--security-opt", | ||
"apparmor=unconfined", | ||
"--hostname=ansible-dev-container" | ||
], | ||
"updateRemoteUserUID": true, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["redhat.ansible"] | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/ansible_creator/resources/ansible_project/.devcontainer/podman/devcontainer.json
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,25 @@ | ||
{ | ||
"name": "ansible-dev-container-podman", | ||
"image": "ghcr.io/ansible/community-ansible-dev-tools-container:latest", | ||
"containerUser": "podman", | ||
"runArgs": [ | ||
"--security-opt", | ||
"seccomp=unconfined", | ||
"--security-opt", | ||
"label=disable", | ||
"--cap-add=SYS_ADMIN", | ||
"--cap-add=SYS_RESOURCE", | ||
"--device", | ||
"/dev/fuse", | ||
"--security-opt", | ||
"apparmor=unconfined", | ||
"--userns=keep-id:uid=1000,gid=1000", | ||
"--hostname=ansible-dev-container" | ||
], | ||
"updateRemoteUserUID": true, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["redhat.ansible"] | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
src/ansible_creator/resources/ansible_project/.github/ansible-code-bot.yml.j2
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,3 @@ | ||
--- | ||
schedule: | ||
interval: "daily" |
18 changes: 18 additions & 0 deletions
18
src/ansible_creator/resources/ansible_project/.github/workflows/tests.yml.j2
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,18 @@ | ||
--- | ||
name: "CI" | ||
{% raw %} | ||
concurrency: | ||
group: ${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
on: # yamllint disable-line rule:truthy | ||
pull_request: | ||
branches: [main] | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
ansible-lint: | ||
uses: ansible/ansible-content-actions/.github/workflows/ansible_lint.yaml@main | ||
{%- endraw %} |
3 changes: 3 additions & 0 deletions
3
src/ansible_creator/resources/ansible_project/.vscode/extensions.json
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,3 @@ | ||
{ | ||
"recommendations": ["redhat.ansible"] | ||
} |
44 changes: 44 additions & 0 deletions
44
src/ansible_creator/resources/ansible_project/README.md.j2
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,44 @@ | ||
# {{ scm_org|capitalize }} {{ scm_project|capitalize }} Ansible Project | ||
|
||
## Included content/ Directory Structure | ||
|
||
The directory structure follows best practices recommended by the Ansible community. Feel free to customize this template according to your specific project requirements. | ||
|
||
``` | ||
ansible-project/ | ||
|── .devcontainer/ | ||
| └── docker/ | ||
| └── devcontainer.json | ||
| └── podman/ | ||
| └── devcontainer.json | ||
| └── devcontainer.json | ||
|── .github/ | ||
| └── workflows/ | ||
| └── tests.yml | ||
| └── ansible-code-bot.yml | ||
|── .vscode/ | ||
| └── extensions.json | ||
|── collections/ | ||
| └── requirements.yml | ||
| └── ansible_collections/ | ||
| └── project_org/ | ||
| └── project_repo/ | ||
| └── README.md | ||
| └── roles/sample_role/ | ||
| └── README.md | ||
| └── tasks/main.yml | ||
|── inventory/ | ||
| └── groups_vars/ | ||
| └── host_vars/ | ||
| └── hosts.yml | ||
|── ansible-navigator.yml | ||
|── ansible.cfg | ||
|── linux_playbook.yml | ||
|── network_playbook.yml | ||
|── README.md | ||
|── site.yml | ||
``` | ||
|
||
## Compatible with Ansible-lint | ||
|
||
Tested with ansible-lint >=24.2.0 releases and the current development version of ansible-core. |
17 changes: 17 additions & 0 deletions
17
src/ansible_creator/resources/ansible_project/ansible-navigator.yml.j2
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,17 @@ | ||
{% raw %}--- | ||
ansible-navigator: | ||
logging: | ||
level: debug | ||
append: False | ||
file: $PWD/.logs/ansible-navigator.log | ||
|
||
execution-environment: | ||
enabled: true | ||
image: ghcr.io/ansible/community-ansible-dev-tools-container:latest | ||
pull: | ||
policy: always | ||
|
||
playbook-artifact: | ||
enable: True | ||
save-as: "$PWD/.logs/{playbook_name}-artifact-{time_stamp}.json" | ||
{%- endraw %} |
26 changes: 26 additions & 0 deletions
26
src/ansible_creator/resources/ansible_project/ansible.cfg.j2
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,26 @@ | ||
[defaults] | ||
# Specify the inventory file | ||
inventory = inventory/hosts.yml | ||
|
||
# Define the directory for host and group variables | ||
host_vars_inventory = inventory/host_vars | ||
group_vars_inventory = inventory/group_vars | ||
|
||
# Specify the collections directory | ||
collections_paths = collections/ansible_collections | ||
|
||
# Set the logging verbosity level | ||
verbosity = 2 | ||
|
||
# Set the default user for SSH connections | ||
remote_user = myuser | ||
|
||
# Define the default become method | ||
become_method = sudo | ||
|
||
[persistent_connection] | ||
# Controls how long the persistent connection will remain idle before it is destroyed | ||
connect_timeout=30 | ||
|
||
# Controls the amount of time to wait for response from remote device before timing out persistent connection | ||
command_timeout=30 |
Oops, something went wrong.