Commit da4cc7cf authored by ale's avatar ale
Browse files

Run automation scripts to generate configs at the end of the testdata setup

parent dd55c102
Pipeline #15280 failed with stage
in 9 minutes and 46 seconds
......@@ -10,14 +10,9 @@
content: "{{ vars|to_nice_yaml }}"
- name: Setup test Docker image
docker_image:
name: registry.git.autistici.org/ai3/config:integration-test
force: true
when: "float_debian_dist == 'stretch'"
- name: Setup test Docker image
command: "podman pull registry.git.autistici.org/ai3/config:integration-test"
when: "float_debian_dist != 'stretch'"
command: "float-pull-image registry.git.autistici.org/ai3/config:integration-test"
register: test_container_image
failed_when: "test_container_image.rc not in [0, 42]"
- name: Run tests
command: docker run --net host --mount type=bind,source=/tmp/test-config.yml,destination=/test-config.yml registry.git.autistici.org/ai3/config:integration-test
command: "docker run --rm --net host --mount type=bind,source=/tmp/test-config.yml,destination=/test-config.yml registry.git.autistici.org/ai3/config:integration-test"
......@@ -21,8 +21,26 @@
vars:
testdata_dir: "{{ lookup('env', 'TESTDATA_DIR') | default(playbook_dir + '/../../testdata', True) }}"
# Run the automation scripts that generate configurations.
- hosts: frontend
gather_facts: no
tasks:
- name: Configure account-automation frontend
command: /opt/ai/scripts/config-nginx
command: "/opt/ai/scripts/{{ item }}"
loop:
- config-nginx
- config-dns
- config-mail-domains
- config-mailman
- config-opendkim
- hosts: backend
gather_facts: no
tasks:
- name: Configure account-automation backend
command: "/opt/ai/scripts/{{ item }}"
loop:
- create-websites
- config-apache-instances
- config-homedir-map
- config-lurker
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment