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"
|
python_version = "2.7"
|
||||||
|
|
||||||
[scripts]
|
[scripts]
|
||||||
test ="molecule test --destroy=never"
|
test ="molecule test --destroy=never --platform _PLATFORM_"
|
||||||
worker ="molecule test -s worker --destroy=never"
|
worker ="molecule test -s worker --destroy=never --platform _PLATFORM_"
|
||||||
agent ="molecule test -s wazuh-agent --destroy=never"
|
agent ="molecule test -s wazuh-agent --destroy=never --platform _PLATFORM_"
|
||||||
elasticsearch ="molecule test -s elasticsearch --destroy=never"
|
elasticsearch ="molecule test -s elasticsearch --destroy=never --platform _PLATFORM_"
|
||||||
kibana ="molecule test -s kibana --destroy=never"
|
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_elasticsearch ="molecule destroy -s elasticsearch"
|
||||||
|
destroy_worker ="molecule destroy -s worker"
|
||||||
destroy ="molecule destroy"
|
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
|
- name: Converge
|
||||||
hosts: all
|
hosts: all
|
||||||
roles:
|
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' }
|
- { role: wazuh/ansible-filebeat, filebeat_output_elasticsearch_hosts: 'elasticsearch:9200' }
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@ lint:
|
|||||||
config-data:
|
config-data:
|
||||||
ignore: .virtualenv
|
ignore: .virtualenv
|
||||||
platforms:
|
platforms:
|
||||||
- name: elasticsearch
|
- name: worker
|
||||||
image: solita/ubuntu-systemd:bionic
|
image: solita/ubuntu-systemd:bionic
|
||||||
command: /sbin/init
|
command: /sbin/init
|
||||||
ulimits:
|
ulimits:
|
||||||
@ -54,6 +54,22 @@ provisioner:
|
|||||||
lint:
|
lint:
|
||||||
name: ansible-lint
|
name: ansible-lint
|
||||||
enabled: true
|
enabled: true
|
||||||
|
scenario:
|
||||||
|
name: worker
|
||||||
|
test_sequence:
|
||||||
|
- lint
|
||||||
|
- dependency
|
||||||
|
- cleanup
|
||||||
|
- destroy
|
||||||
|
- syntax
|
||||||
|
- create
|
||||||
|
- prepare
|
||||||
|
- converge
|
||||||
|
#- idempotence
|
||||||
|
- side_effect
|
||||||
|
- verify
|
||||||
|
- cleanup
|
||||||
|
- destroy
|
||||||
verifier:
|
verifier:
|
||||||
name: testinfra
|
name: testinfra
|
||||||
lint:
|
lint:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#sudo pipenv run elasticsearch
|
sudo pipenv run elasticsearch
|
||||||
sudo pipenv run test
|
sudo pipenv run test
|
||||||
sudo pipenv run worker
|
sudo pipenv run worker
|
||||||
Loading…
Reference in New Issue
Block a user