Changeset - c58fe872a345
[Not reviewed]
0 2 0
Branko Majic (branko) - 14 days ago 2024-09-06 12:26:15
branko@majic.rs
MAR-218: Fix test instance preparation for php_website testing:

- Some of the tasks can only be run without errors on the spun up PHP
website instance due to (un)availability of ansible_eth0 variable.
2 files changed with 6 insertions and 0 deletions:
0 comments (0 inline, 0 general)
roles/php_website/molecule/default/molecule.yml
Show inline comments
 
@@ -4,24 +4,25 @@ dependency:
 
  name: galaxy
 
  enabled: false
 

	
 
driver:
 
  name: vagrant
 
  provider:
 
    name: virtualbox
 

	
 
platforms:
 

	
 
  - name: php-website-bookworm
 
    groups:
 
      - php-website
 
      - parameters-mandatory
 
      - parameters-optional
 
    box: debian/bookworm64
 
    memory: 512
 
    cpus: 1
 
    provider_raw_config_args:
 
      - "customize ['modifyvm', :id, '--paravirtprovider', 'minimal']"
 

	
 
provisioner:
 
  name: ansible
 
  playbooks:
 
    cleanup: cleanup.yml
roles/php_website/molecule/default/prepare.yml
Show inline comments
 
@@ -43,24 +43,29 @@
 
  tasks:
 

	
 
    - name: Install python for Ansible
 
      ansible.builtin.raw: test -e /usr/bin/python3 || (apt -y update && apt install -y python3-minimal)
 
      become: true
 
      changed_when: false
 

	
 
    - name: Update all caches to avoid errors due to missing remote archives
 
      ansible.builtin.apt:
 
        update_cache: true
 
      changed_when: false
 

	
 
- name: Prepare, test fixtures
 
  hosts: php-website
 
  become: true
 
  tasks:
 

	
 
    - name: Set-up /etc/hosts entries
 
      ansible.builtin.lineinfile:
 
        dest: /etc/hosts
 
        line: "{{ ansible_eth0.ipv4.address }} parameters-mandatory parameters-optional.local php-website"
 

	
 
    - name: Install curl for testing redirects and webpage content
 
      ansible.builtin.apt:
 
        name: curl
 
        state: present
 

	
 
    - name: Install swaks for testing mail forwarding
 
      ansible.builtin.apt:
0 comments (0 inline, 0 general)