diff --git a/tests/integration/README.md b/tests/integration/README.md index 154785950..dfda7d864 100644 --- a/tests/integration/README.md +++ b/tests/integration/README.md @@ -9,6 +9,11 @@ Test playbooks assume that firewalls have the following initial configuration: - DHCP management configuration - a CA certificate with key named `local-ca` marked as `forward trust` +And panoramas to have: + +- `Test-DG` device group +- `Test-Template` template + Add firewalls to `firewall` group in inventory, Panorama instances to `panoramas` group (see `inventory.example`): @@ -28,13 +33,13 @@ booted, and save a copy of the config into `blank.xml` on the device. ### Run a single test ``` -ansible-playbook -i inventory run_single_test.yml -e test=test_panos_address_object +ansible-playbook -i inventory.ini run_single_test.yml -e test=test_panos_address_object ``` ### Run all tests ``` -ansible-playbook -i inventory run_all_tests.yml +ansible-playbook -i inventory.ini run_all_tests.yml ``` ## Writing a test @@ -140,4 +145,4 @@ template: '{{ template | default(omit) }}' ``` The built-in Ansible module [assert](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/assert_module.html) -is used to check results. \ No newline at end of file +is used to check results. diff --git a/tests/integration/inventory.example b/tests/integration/inventory.example index 3b8bdf4e4..e29b5ed33 100644 --- a/tests/integration/inventory.example +++ b/tests/integration/inventory.example @@ -1,15 +1,18 @@ [firewalls] -panos-10 ansible_host=192.168.55.10 +panos-10 ansible_host=192.168.55.10 ip_address=192.168.55.10 [panoramas] panorama-10 ip_address=192.168.55.5 [all:vars] -ansible_user=admin -ansible_password=something - -ansible_network_os=mrichardson03.panos.panos -ansible_connection=httpapi -ansible_httpapi_port=443 -ansible_httpapi_use_ssl=True -ansible_httpapi_validate_certs=False +username=admin +password=something + +# ansible_user=admin +# ansible_password=something + +# ansible_network_os=mrichardson03.panos.panos +# ansible_connection=httpapi +# ansible_httpapi_port=443 +# ansible_httpapi_use_ssl=True +# ansible_httpapi_validate_certs=False diff --git a/tests/integration/setup.yml b/tests/integration/setup.yml index 0383b514e..eb67fff9e 100644 --- a/tests/integration/setup.yml +++ b/tests/integration/setup.yml @@ -19,6 +19,7 @@ until: result is not failed and (result.stdout | from_json).response.result == 'yes' retries: 5 delay: 300 + when: inventory_hostname in groups['firewalls'] - name: Save copy of blank config paloaltonetworks.panos.panos_op: