/home/zuul/src/opendev.org/opendev/system-config/playbooks/service-lists3.yaml
Execution
Date
08 Apr 2026 21:37:16 +0000
Duration
00:03:38.72
Controller
bridge99.opendev.org
User
root
Versions
Ansible
2.15.13
ara
1.7.5 / 1.7.5
Python
3.10.12
Summary
1
Hosts
161
Tasks
159
Results
1
Plays
21
Files
0
Records
File: /home/zuul/src/opendev.org/opendev/system-config/playbooks/roles/mailman3/tasks/create_lists.yaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | - name: Check if domain exists uri: url: 'http://localhost:8001/3.1/domains/{{ mm_site.listdomain }}' url_username: restadmin url_password: "{{ mailman3_rest_password }}" force_basic_auth: yes method: GET body_format: json status_code: [200, 404] register: domain_exists no_log: true - name: Create list domain in mm3 when: domain_exists.status == 404 uri: url: 'http://localhost:8001/3.1/domains' url_username: restadmin url_password: "{{ mailman3_rest_password }}" force_basic_auth: yes method: POST body_format: json body: mail_host: "{{ mm_site.listdomain }}" status_code: [201] no_log: true - name: Check if list exists uri: url: 'http://localhost:8001/3.1/lists/{{ mm_list.name }}@{{ mm_site.listdomain }}' url_username: restadmin url_password: "{{ mailman3_rest_password }}" force_basic_auth: yes method: GET body_format: json status_code: [200, 404] register: list_exists loop: "{{ mm_site.lists }}" loop_control: loop_var: mm_list no_log: true - name: Create lists in mm3 when: list_exists.results[exists_idx].status == 404 uri: url: 'http://localhost:8001/3.1/lists' url_username: restadmin url_password: "{{ mailman3_rest_password }}" force_basic_auth: yes method: POST body_format: json body: fqdn_listname: "{{ mm_list.name }}@{{ mm_site.listdomain }}" style_name: "{{ mm_list.private | default('false') | bool | ternary('private-default', 'legacy-default') }}" status_code: [201] loop: "{{ mm_site.lists }}" loop_control: loop_var: mm_list index_var: exists_idx no_log: true - name: Set list properties in mm3 when: list_exists.results[exists_idx].status == 404 uri: url: 'http://localhost:8001/3.1/lists/{{ mm_list.name }}@{{ mm_site.listdomain }}/config' url_username: restadmin url_password: "{{ mailman3_rest_password }}" force_basic_auth: yes method: PATCH body_format: json body: description: "{{ mm_list.description }}" advertised: "{{ mm_list.private | default('false') | bool | ternary('false', 'true') }}" # TODO enable this when lynx is present on the container images # convert_html_to_plaintext: "true" process_bounces: "false" filter_extensions: - "exe" - "bat" - "cmd" - "com" - "pif" - "scr" - "vbs" - "cpl" pass_types: - "multipart/mixed" - "multipart/alternative" - "text/plain" status_code: [204] loop: "{{ mm_site.lists }}" loop_control: loop_var: mm_list index_var: exists_idx no_log: true - name: Set list owner in mm3 when: list_exists.results[exists_idx].status == 404 uri: url: 'http://localhost:8001/3.1/members' url_username: restadmin url_password: "{{ mailman3_rest_password }}" force_basic_auth: yes method: POST body_format: json body: list_id: "{{ mm_list.name }}.{{ mm_site.listdomain }}" subscriber: "{{ mm_list.owner }}" role: "owner" status_code: [201] loop: "{{ mm_site.lists }}" loop_control: loop_var: mm_list index_var: exists_idx no_log: true |