WIP: Testing CI
This commit is contained in:
parent
423d57164a
commit
bd9ef4cb2d
43
.github/actions/default/Dockerfile
vendored
43
.github/actions/default/Dockerfile
vendored
@ -1,48 +1,7 @@
|
||||
FROM python:3.7-alpine
|
||||
|
||||
LABEL "com.github.actions.name"="molecule"
|
||||
LABEL "com.github.actions.description"="Run Ansible Molecule"
|
||||
LABEL "com.github.actions.icon"="upload"
|
||||
LABEL "com.github.actions.color"="green"
|
||||
|
||||
ARG BUILD_DEPS="\
|
||||
gcc \
|
||||
libc-dev \
|
||||
make \
|
||||
musl-dev \
|
||||
libffi-dev \
|
||||
openssl-dev \
|
||||
"
|
||||
|
||||
ARG PACKAGES="\
|
||||
docker \
|
||||
git \
|
||||
openssh-client \
|
||||
"
|
||||
|
||||
ARG PIP_INSTALL_ARGS="\
|
||||
--no-cache-dir \
|
||||
"
|
||||
|
||||
# ARG PIP_MODULES="\
|
||||
# netaddr \
|
||||
# "
|
||||
|
||||
ARG MOLECULE_EXTRAS="docker"
|
||||
|
||||
RUN apk add --update --no-cache ${BUILD_DEPS} ${PACKAGES} && \
|
||||
pip install ${PIP_INSTALL_ARGS} ${PIP_MODULES} "molecule[${MOLECULE_EXTRAS}]" && \
|
||||
apk del --no-cache ${BUILD_DEPS} && \
|
||||
rm -rf /root/.cache
|
||||
|
||||
# CMD cd ${GITHUB_REPOSITORY}; molecule ${INPUT_MOLECULE_OPTIONS} ${INPUT_MOLECULE_COMMAND} ${INPUT_MOLECULE_ARGS}
|
||||
# Adding systemd compatibility.
|
||||
COPY . /wazuh-ansible
|
||||
WORKDIR /wazuh-ansible
|
||||
FROM quay.io/ansible/molecule:2.20
|
||||
|
||||
VOLUME [ "/sys/fs/cgroup", "/run", "/run/lock" ]
|
||||
|
||||
COPY ./entrypoint.sh /entrypoint.sh
|
||||
RUN chmod 755 /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
|
||||
6
.github/actions/default/entrypoint.sh
vendored
6
.github/actions/default/entrypoint.sh
vendored
@ -1,5 +1,3 @@
|
||||
#! /usr/bin/env bash
|
||||
set -e
|
||||
#!/bin/sh -eu
|
||||
|
||||
cd molecule
|
||||
molecule test -s default
|
||||
molecule test
|
||||
@ -23,11 +23,10 @@ provisioner:
|
||||
ANSIBLE_ROLES_PATH: ./roles
|
||||
lint:
|
||||
name: ansible-lint
|
||||
enabled: true
|
||||
enabled: false
|
||||
scenario:
|
||||
name: default
|
||||
test_sequence:
|
||||
- lint
|
||||
- dependency
|
||||
- syntax
|
||||
- create
|
||||
@ -41,4 +40,4 @@ verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
||||
enabled: true
|
||||
enabled: false
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
- name: Converge
|
||||
hosts: all
|
||||
roles:
|
||||
- role: wazuh/ansible-wazuh-manager
|
||||
- role: ../../roles/wazuh/ansible-wazuh-manager
|
||||
vars:
|
||||
wazuh_manager_config:
|
||||
cluster:
|
||||
@ -14,6 +14,6 @@
|
||||
port: '1516'
|
||||
bind_addr: '0.0.0.0'
|
||||
nodes:
|
||||
- "manager_{{ lookup('env', 'MOL_PLATFORM') or 'centos7' }}"
|
||||
- "manager_centos7"
|
||||
hidden: 'no'
|
||||
- { role: wazuh/ansible-filebeat, filebeat_output_elasticsearch_hosts: "elasticsearch_{{ lookup('env', 'MOL_PLATFORM') or 'centos7' }}:9200" }
|
||||
- { role: ../../roles/wazuh/ansible-filebeat, filebeat_output_elasticsearch_hosts: "elasticsearch_centos7:9200" }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user