possible solution for ansible variables access and improving Pipefile
This commit is contained in:
parent
defd2ab2f8
commit
675e2c5c88
13
Pipfile
13
Pipfile
@ -14,12 +14,13 @@ molecule = "==2.20.2"
|
||||
python_version = "2.7"
|
||||
|
||||
[scripts]
|
||||
test ="molecule test --destroy=never"
|
||||
worker ="molecule test -s worker --destroy=never"
|
||||
agent ="molecule test -s wazuh-agent --destroy=never"
|
||||
elasticsearch ="molecule test -s elasticsearch --destroy=never"
|
||||
kibana ="molecule test -s kibana --destroy=never"
|
||||
test ="molecule test --destroy=never --platform _PLATFORM_"
|
||||
worker ="molecule test -s worker --destroy=never --platform _PLATFORM_"
|
||||
agent ="molecule test -s wazuh-agent --destroy=never --platform _PLATFORM_"
|
||||
elasticsearch ="molecule test -s elasticsearch --destroy=never --platform _PLATFORM_"
|
||||
kibana ="molecule test -s kibana --destroy=never --platform _PLATFORM_"
|
||||
|
||||
# Destroy all the existing containers ' Created by Molecule '
|
||||
# Destroy all the existing containers ' Molecule instances '
|
||||
destroy_elasticsearch ="molecule destroy -s elasticsearch"
|
||||
destroy_worker ="molecule destroy -s worker"
|
||||
destroy ="molecule destroy"
|
||||
|
||||
26
Pipfile.template
Normal file
26
Pipfile.template
Normal file
@ -0,0 +1,26 @@
|
||||
[[source]]
|
||||
url = "https://pypi.org/simple"
|
||||
verify_ssl = true
|
||||
name = "pypi"
|
||||
|
||||
[packages]
|
||||
docker-py = "*"
|
||||
ansible = "==2.7.13"
|
||||
molecule = "==2.20.2"
|
||||
|
||||
[dev-packages]
|
||||
|
||||
[requires]
|
||||
python_version = "2.7"
|
||||
|
||||
[scripts]
|
||||
test ="molecule test --destroy=never"
|
||||
worker ="molecule test -s worker --destroy=never"
|
||||
agent ="molecule test -s wazuh-agent --destroy=never"
|
||||
elasticsearch ="molecule test -s elasticsearch --destroy=never"
|
||||
kibana ="molecule test -s kibana --destroy=never"
|
||||
|
||||
# Destroy all the existing containers ' Created by Molecule '
|
||||
destroy_elasticsearch ="molecule destroy -s elasticsearch"
|
||||
destroy_worker ="molecule destroy -s worker"
|
||||
destroy ="molecule destroy"
|
||||
@ -2,6 +2,8 @@
|
||||
- name: Converge
|
||||
hosts: all
|
||||
roles:
|
||||
- role: wazuh/ansible-wazuh-manager
|
||||
- { role: wazuh/ansible-wazuh-manager,
|
||||
wazuh_manager_config[cluster][disable]: 'no',
|
||||
}
|
||||
- { role: wazuh/ansible-filebeat, filebeat_output_elasticsearch_hosts: 'elasticsearch:9200' }
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ lint:
|
||||
config-data:
|
||||
ignore: .virtualenv
|
||||
platforms:
|
||||
- name: elasticsearch
|
||||
- name: worker
|
||||
image: solita/ubuntu-systemd:bionic
|
||||
command: /sbin/init
|
||||
ulimits:
|
||||
@ -54,6 +54,22 @@ provisioner:
|
||||
lint:
|
||||
name: ansible-lint
|
||||
enabled: true
|
||||
scenario:
|
||||
name: worker
|
||||
test_sequence:
|
||||
- lint
|
||||
- dependency
|
||||
- cleanup
|
||||
- destroy
|
||||
- syntax
|
||||
- create
|
||||
- prepare
|
||||
- converge
|
||||
#- idempotence
|
||||
- side_effect
|
||||
- verify
|
||||
- cleanup
|
||||
- destroy
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
#sudo pipenv run elasticsearch
|
||||
sudo pipenv run elasticsearch
|
||||
sudo pipenv run test
|
||||
sudo pipenv run worker
|
||||
Loading…
Reference in New Issue
Block a user