initial drone build test
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Chris Hammer 2023-12-16 01:19:54 -05:00
parent 4125d011d2
commit aebaa0d348
7 changed files with 85 additions and 0 deletions

3
.drone.env Normal file
View File

@ -0,0 +1,3 @@
export ANSIBLE_LINT_EXCLUSION="--exclude .gitea"
export ANSIBLE_INVENTORY="-i 127.0.0.1, --connection=local"
export ANSIBLE_PLAYBOOK="baseos.yml"

26
.drone.yml Normal file
View File

@ -0,0 +1,26 @@
---
kind: pipeline
type: docker
name: CentOS_9-Ansible-Pipeline
trigger:
branch:
exclude:
- main
event: [push]
steps:
- name: ansible_environment_verify
image: gitea.thezengarden.net/podman/ansible-dev/centos9:release
commands:
- . ./.drone.env
- env
- git log -1
- ansible --version
- ansible-lint --version
- name: ansible_lint
image: gitea.thezengarden.net/podman/ansible-dev/centos9:release
commands:
- . ./.drone.env
- ansible-lint --offline $ANSIBLE_LINT_EXCLUSION

2
ansible.cfg Normal file
View File

@ -0,0 +1,2 @@
[defaults]
roles_path = roles

4
roles/testing/README.md Normal file
View File

@ -0,0 +1,4 @@
Role Name
=========
A simple role to say hello to the world.

View File

@ -0,0 +1,29 @@
galaxy_info:
author: Chris Hammer
description: Simple default role to say hello world.
license: GPL-2.0-or-later
min_ansible_version: "2.14"
platforms:
- name: Fedora
versions:
- all
- name: EL
versions:
- "8"
- "9"
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.

View File

@ -0,0 +1,7 @@
---
- name: Hello World.
ansible.builtin.debug:
msg: Hello world.
...

14
tests/unit-test.yml Normal file
View File

@ -0,0 +1,14 @@
---
- name: Test the role provided in extra_vars
hosts: all
become: false
gather_facts: true
tasks:
- name: Include role to test
ansible.builtin.include_role:
name: "{{ __test_role | default('testing') }}"
...