🔨 Change folder structure

This commit is contained in:
SebClem 2022-12-30 13:59:13 +01:00
parent f044682421
commit 09fd2d74d4
Signed by: sebclem
GPG Key ID: 5A4308F6A359EA50
9 changed files with 46 additions and 9 deletions

View File

@ -1,9 +1,10 @@
{
"files.autoSave": "afterDelay",
"files.associations": {
"hosts": "yaml",
"*.yml": "ansible"
"**hosts*": "yaml",
"*.yml": "ansible",
"**/.woodpecker/*.yml": "yaml"
},
"ansible.ansible.useFullyQualifiedCollectionNames": true,
"editor.formatOnSave": true
"ansible.ansible.useFullyQualifiedCollectionNames": true,
"editor.formatOnSave": true
}

36
.woodpecker/ansible.yml Normal file
View File

@ -0,0 +1,36 @@
pipeline:
check-ansible-syntax:
image: harbor.sebclem.fr/sebclem/woodpecker-ansible-runner
pull: true
settings:
playbook: playbooks/install.yml
galaxy_file: roles/requirements.yml
check_syntax: true
vault_token:
from_secret: ansible_vault_token
when:
- event: "push"
branch: [main, master]
- event: [pull_request, manual, deployment]
run-ansible-playbook:
image: harbor.sebclem.fr/sebclem/woodpecker-ansible-runner
pull: true
settings:
verbosity: ${verbosity=0}
limit: ${limit}
tags: ${tags}
playbook: playbooks/install.yml
galaxy_file: roles/requirements.yml
vault_token:
from_secret: ansible_vault_token
private_key:
from_secret: ansible_private_key
when:
environment: production
event: deployment
when:
- event: "push"
branch: [main, master]
- event: [pull_request, manual, deployment]

View File

@ -1,8 +1,9 @@
[defaults]
inventory = hosts
inventory = inventories/hosts.yml
remote_user = root
host_key_checking = True
vault_password_file = credentials/vault_token
roles_path = ./roles
force_color = true
stdout_callback = yaml
ansible_managed = This file is managed by ansible, don't make changes here - they will be overwritten.

View File

@ -1,5 +1,4 @@
---
all:
children:
nodes:

View File

@ -4,8 +4,8 @@
pre_tasks:
- name: Load secrets
include_vars:
file: "secrets/{{ inventory_hostname }}.yml"
ansible.builtin.include_vars:
file: "{{ inventory_dir }}/secrets/{{ inventory_hostname }}.yml"
tags:
- always

View File

@ -3,7 +3,7 @@
"extends": [
"config:base",
"group:nodeJs",
"local>sebclem/renovate-configs:notest",
"local>sebclem/renovate-configs",
"local>sebclem/renovate-configs:ansible_host_var"
]
}