Skip to content
Snippets Groups Projects
Verified Commit 2762e2f6 authored by Evangelos Foutras's avatar Evangelos Foutras :smiley_cat:
Browse files

Apply jinja[spacing] recommendations

parent 1ae3a815
No related branches found
No related tags found
1 merge request!631Fix lint warnings and errors with ansible-lint 6.6.0
...@@ -20,28 +20,28 @@ ...@@ -20,28 +20,28 @@
- name: Set archweb groups - name: Set archweb groups
user: name=archweb groups=uwsgi user: name=archweb groups=uwsgi
when: archweb_site|bool when: archweb_site | bool
- name: Create ssl cert - name: Create ssl cert
include_role: include_role:
name: certificate name: certificate
vars: vars:
domains: "{{ [archweb_domain] + archweb_alternate_domains }}" domains: "{{ [archweb_domain] + archweb_alternate_domains }}"
when: archweb_site|bool and maintenance is not defined when: archweb_site | bool and maintenance is not defined
- name: Set up nginx - name: Set up nginx
template: src=nginx.d.conf.j2 dest="{{ archweb_nginx_conf }}" owner=root group=root mode=644 template: src=nginx.d.conf.j2 dest="{{ archweb_nginx_conf }}" owner=root group=root mode=644
notify: Reload nginx notify: Reload nginx
when: archweb_site|bool and maintenance is not defined when: archweb_site | bool and maintenance is not defined
tags: ['nginx'] tags: ['nginx']
- name: Make nginx log dir - name: Make nginx log dir
file: path=/var/log/nginx/{{ archweb_domain }} state=directory owner=root group=root mode=0755 file: path=/var/log/nginx/{{ archweb_domain }} state=directory owner=root group=root mode=0755
when: archweb_site|bool when: archweb_site | bool
- name: Make rsync iso dir - name: Make rsync iso dir
file: path={{ archweb_rsync_iso_dir }} state=directory owner=archweb group=archweb mode=0755 file: path={{ archweb_rsync_iso_dir }} state=directory owner=archweb group=archweb mode=0755
when: archweb_site|bool when: archweb_site | bool
- name: Clone archweb repo - name: Clone archweb repo
git: > git: >
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
- name: Create media dir - name: Create media dir
file: state=directory owner=archweb group=archweb mode=0755 path="{{ archweb_dir }}/media" file: state=directory owner=archweb group=archweb mode=0755 path="{{ archweb_dir }}/media"
when: archweb_site|bool when: archweb_site | bool
- name: Fix home permissions - name: Fix home permissions
file: state=directory owner=archweb group=archweb mode=0755 path="{{ archweb_dir }}" file: state=directory owner=archweb group=archweb mode=0755 path="{{ archweb_dir }}"
...@@ -211,7 +211,7 @@ ...@@ -211,7 +211,7 @@
template: src="archweb-memcached.service.j2" dest="/etc/systemd/system/archweb-memcached.service" owner=root group=root mode=0644 template: src="archweb-memcached.service.j2" dest="/etc/systemd/system/archweb-memcached.service" owner=root group=root mode=0644
notify: notify:
- Daemon reload - Daemon reload
when: archweb_site|bool when: archweb_site | bool
- name: Install archweb rsync iso service and timer - name: Install archweb rsync iso service and timer
template: src="{{ item }}.j2" dest="/etc/systemd/system/{{ item }}" owner=root group=root mode=0644 template: src="{{ item }}.j2" dest="/etc/systemd/system/{{ item }}" owner=root group=root mode=0644
...@@ -220,11 +220,11 @@ ...@@ -220,11 +220,11 @@
- archweb-rsync_iso.timer - archweb-rsync_iso.timer
notify: notify:
- Daemon reload - Daemon reload
when: archweb_site|bool when: archweb_site | bool
- name: Deploy archweb - name: Deploy archweb
template: src=archweb.ini.j2 dest=/etc/uwsgi/vassals/archweb.ini owner=archweb group=http mode=0640 template: src=archweb.ini.j2 dest=/etc/uwsgi/vassals/archweb.ini owner=archweb group=http mode=0640
when: archweb_site|bool when: archweb_site | bool
- name: Deploy new release - name: Deploy new release
file: path=/etc/uwsgi/vassals/archweb.ini state=touch owner=archweb group=http mode=0640 file: path=/etc/uwsgi/vassals/archweb.ini state=touch owner=archweb group=http mode=0640
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
with_items: with_items:
- archweb-memcached.service - archweb-memcached.service
- archweb-rsync_iso.timer - archweb-rsync_iso.timer
when: archweb_site|bool when: archweb_site | bool
- name: Start and enable archweb reporead service - name: Start and enable archweb reporead service
service: name="archweb-reporead.service" enabled=yes state=started service: name="archweb-reporead.service" enabled=yes state=started
...@@ -288,7 +288,7 @@ ...@@ -288,7 +288,7 @@
- name: Create retro dir - name: Create retro dir
file: state=directory owner=archweb group=archweb mode=0755 path="{{ archweb_retro_dir }}" file: state=directory owner=archweb group=archweb mode=0755 path="{{ archweb_retro_dir }}"
when: archweb_site|bool when: archweb_site | bool
- name: Clone archweb-retro repo - name: Clone archweb-retro repo
git: git:
...@@ -297,4 +297,4 @@ ...@@ -297,4 +297,4 @@
version: "{{ archweb_retro_commit_hash }}" version: "{{ archweb_retro_commit_hash }}"
become: true become: true
become_user: archweb become_user: archweb
when: archweb_site|bool when: archweb_site | bool
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
- name: Update list of sub-accounts - name: Update list of sub-accounts
set_fact: set_fact:
subaccounts: "{{ subaccounts + [item.json.subaccount | combine({'comment':item.invocation.module_args.body.comment})] }}" subaccounts: "{{ subaccounts + [item.json.subaccount | combine({'comment': item.invocation.module_args.body.comment})] }}"
loop: "{{ new_subaccounts_raw.results }}" loop: "{{ new_subaccounts_raw.results }}"
loop_control: loop_control:
label: "{{ item.invocation.module_args.body.comment }}" label: "{{ item.invocation.module_args.body.comment }}"
......
...@@ -27,11 +27,11 @@ ...@@ -27,11 +27,11 @@
- name: Partition and format the disks (btrfs RAID) - name: Partition and format the disks (btrfs RAID)
command: mkfs.btrfs -f -L root -d {{ raid_level | default('raid1') }} -m {{ raid_level | default('raid1') }} -O no-holes {{ system_disks | map('regex_replace', '^(.*)$', '\g<1>p2' if 'nvme' in system_disks[0] else '\g<1>2') | join(' ') }} command: mkfs.btrfs -f -L root -d {{ raid_level | default('raid1') }} -m {{ raid_level | default('raid1') }} -O no-holes {{ system_disks | map('regex_replace', '^(.*)$', '\g<1>p2' if 'nvme' in system_disks[0] else '\g<1>2') | join(' ') }}
when: filesystem == "btrfs" and system_disks|length >= 2 when: filesystem == "btrfs" and system_disks | length >= 2
- name: Partition and format the disks (btrfs single) - name: Partition and format the disks (btrfs single)
command: mkfs.btrfs -f -L root -d single -m single -O no-holes {{ system_disks[0] }}{{ 'p2' if 'nvme' in system_disks[0] else '2' }} command: mkfs.btrfs -f -L root -d single -m single -O no-holes {{ system_disks[0] }}{{ 'p2' if 'nvme' in system_disks[0] else '2' }}
when: filesystem == "btrfs" and system_disks|length == 1 when: filesystem == "btrfs" and system_disks | length == 1
- name: Mount the filesystem (btrfs) - name: Mount the filesystem (btrfs)
mount: src="{{ system_disks[0] }}{{ 'p2' if 'nvme' in system_disks[0] else '2' }}" path=/mnt state=mounted fstype=btrfs opts="compress-force=zstd,space_cache=v2" mount: src="{{ system_disks[0] }}{{ 'p2' if 'nvme' in system_disks[0] else '2' }}" path=/mnt state=mounted fstype=btrfs opts="compress-force=zstd,space_cache=v2"
......
...@@ -45,11 +45,17 @@ lists: ...@@ -45,11 +45,17 @@ lists:
arch-general: arch-general:
description: General Discussion about Arch Linux description: General Discussion about Arch Linux
display_name: Arch-general display_name: Arch-general
info: "This mailing list hosts general discusson about the Arch Linux distribution. Questions, problems, and new development ideas can be posted here.\n\nYou must be subscribed to the list in order to post to it." info: |
This mailing list hosts general discusson about the Arch Linux distribution. Questions, problems, and new development ideas can be posted here.
You must be subscribed to the list in order to post to it.
arch-mirrors-announce: arch-mirrors-announce:
description: List for mirror admins to send announcements (like downtime notifications) to our users description: List for mirror admins to send announcements (like downtime notifications) to our users
display_name: Arch-mirrors-announce display_name: Arch-mirrors-announce
info: "This list is intended for admins of Arch Linux mirrors that want to notify our users about downtime of their mirror.\r\n\r\nThis list also accepts mails from non-subscribers." info: |
This list is intended for admins of Arch Linux mirrors that want to notify our users about downtime of their mirror.
This list also accepts mails from non-subscribers.
arch-mirrors: arch-mirrors:
description: Arch Linux Mirroring Discussion and Announcements description: Arch Linux Mirroring Discussion and Announcements
display_name: Arch-mirrors display_name: Arch-mirrors
...@@ -67,7 +73,12 @@ lists: ...@@ -67,7 +73,12 @@ lists:
arch-projects: arch-projects:
description: Arch Linux projects development discussion description: Arch Linux projects development discussion
display_name: Arch-projects display_name: Arch-projects
info: "Announcements, development discussion, patches and pull requests for the Arch Linux projects:<ul><li><a target=\"blank\" href=\"https://github.com/archlinux/archweb/\">archweb</a> (patches preferably on Github as pull requests)</li><li><a target=\"blank\" href=\"https://gitlab.archlinux.org/archlinux/arch-release-promotion/\">arch-release-promotion</a> (patches only on GitLab as merge requests)</li><li><a target=\"blank\" href=\"https://gitlab.archlinux.org/archlinux/dbscripts/\">dbscripts</a> (patches preferably on GitLab as merge requests)</li><li><a target=\"blank\" href=\"https://gitlab.archlinux.org/archlinux/devtools/\">devtools</a> (patches preferably on GitLab as merge requests)</li><li><a target=\"blank\" href=\"https://github.com/archlinux/mkinitcpio/\">mkinitcpio</a> (patches preferably on Github as pull requests)</li><li><a target=\"blank\" href=\"https://gitlab.archlinux.org/archlinux/namcap/\">namcap</a> (patches preferably on GitLab as merge requests)</li><li><a target=\"blank\" href=\"https://gitlab.archlinux.org/archlinux/netctl/\">netctl</a> (patches preferably on the mailing list)</li><li><a target=\"blank\" href=\"https://gitlab.archlinux.org/archlinux/pyalpm/\">pyalpm</a> (patches preferably on GitLab as merge requests)</li><li><a target=\"blank\" href=\"https://gitlab.archlinux.org/archlinux/repod/\">repod</a> (patches only on GitLab as merge requests)</li><li><a target=\"blank\" href=\"https://gitlab.archlinux.org/archlinux/shim-signed/\">shim-signed</a> (contributions preferably on GitLab as merge requests)</li></ul>\r\nPlease begin the email subject with the name of a project in square brackets (e.g. <code>[devtools]</code>). If no project matches, use <code>[projects]</code>.\r\n\r\nNote: No user discussion!" info: |
Announcements, development discussion, patches and pull requests for the Arch Linux projects:<ul><li><a target="blank" href="https://github.com/archlinux/archweb/">archweb</a> (patches preferably on Github as pull requests)</li><li><a target="blank" href="https://gitlab.archlinux.org/archlinux/arch-release-promotion/">arch-release-promotion</a> (patches only on GitLab as merge requests)</li><li><a target="blank" href="https://gitlab.archlinux.org/archlinux/dbscripts/">dbscripts</a> (patches preferably on GitLab as merge requests)</li><li><a target="blank" href="https://gitlab.archlinux.org/archlinux/devtools/">devtools</a> (patches preferably on GitLab as merge requests)</li><li><a target="blank" href="https://github.com/archlinux/mkinitcpio/">mkinitcpio</a> (patches preferably on Github as pull requests)</li><li><a target="blank" href="https://gitlab.archlinux.org/archlinux/namcap/">namcap</a> (patches preferably on GitLab as merge requests)</li><li><a target="blank" href="https://gitlab.archlinux.org/archlinux/netctl/">netctl</a> (patches preferably on the mailing list)</li><li><a target="blank" href="https://gitlab.archlinux.org/archlinux/pyalpm/">pyalpm</a> (patches preferably on GitLab as merge requests)</li><li><a target="blank" href="https://gitlab.archlinux.org/archlinux/repod/">repod</a> (patches only on GitLab as merge requests)</li><li><a target="blank" href="https://gitlab.archlinux.org/archlinux/shim-signed/">shim-signed</a> (contributions preferably on GitLab as merge requests)</li></ul>
Please begin the email subject with the name of a project in square brackets (e.g. <code>[devtools]</code>). If no project matches, use <code>[projects]</code>.
Note: No user discussion!
arch-releng: arch-releng:
description: Arch Linux Release Engineering description: Arch Linux Release Engineering
display_name: Arch-releng display_name: Arch-releng
...@@ -91,7 +102,10 @@ lists: ...@@ -91,7 +102,10 @@ lists:
arch-women: arch-women:
description: Mailing list for the Arch Women project description: Mailing list for the Arch Women project
display_name: Arch-women display_name: Arch-women
info: "<a href=\"https://archwomen.org/\">Arch Women</a> is an all inclusive organization of Arch Linux enthusiasts with a focus on helping more women become involved in the Arch Linux community and FOSS.\r\n\r\nMailing list graciously hosted by the Arch Linux™ project." info: |
<a href="https://archwomen.org/">Arch Women</a> is an all inclusive organization of Arch Linux enthusiasts with a focus on helping more women become involved in the Arch Linux community and FOSS.
Mailing list graciously hosted by the Arch Linux™ project.
aur-dev: aur-dev:
description: Arch User Repository (AUR) Development description: Arch User Repository (AUR) Development
display_name: Aur-dev display_name: Aur-dev
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
- name: Create the service http root dir - name: Create the service http root dir
file: path={{ maintenance_http_dir }}/{{ service_domain }} state=directory owner=root group=root mode=0755 file: path={{ maintenance_http_dir }}/{{ service_domain }} state=directory owner=root group=root mode=0755
when: maintenance is defined and maintenance|bool when: maintenance is defined and maintenance | bool
- name: Set up nginx maintenance mode - name: Set up nginx maintenance mode
template: template:
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
group: root group: root
mode: 0644 mode: 0644
notify: Reload nginx notify: Reload nginx
when: service_nginx_template is not defined and maintenance is defined and maintenance|bool when: service_nginx_template is not defined and maintenance is defined and maintenance | bool
- name: Set up custom nginx maintenance mode - name: Set up custom nginx maintenance mode
template: template:
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
group: root group: root
mode: 0644 mode: 0644
notify: Reload nginx notify: Reload nginx
when: service_nginx_template is defined and maintenance is defined and maintenance|bool when: service_nginx_template is defined and maintenance is defined and maintenance | bool
- name: Create the 503 html file - name: Create the 503 html file
template: template:
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
owner: root owner: root
group: root group: root
mode: 0644 mode: 0644
when: maintenance is defined and maintenance|bool when: maintenance is defined and maintenance | bool
- name: Force reload nginx - name: Force reload nginx
meta: flush_handlers meta: flush_handlers
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
copy: src=dns.conf dest={{ chroot_path }}/etc/systemd/network/10-static-ethernet.network.d/dns.conf owner=root group=root mode=0644 copy: src=dns.conf dest={{ chroot_path }}/etc/systemd/network/10-static-ethernet.network.d/dns.conf owner=root group=root mode=0644
notify: notify:
- Restart networkd - Restart networkd
when: static_dns|default(true) when: static_dns | default(true)
when: not dhcp|default(false) when: not dhcp | default(false)
- name: Configure network (dhcp) - name: Configure network (dhcp)
block: block:
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
copy: src=dns.conf dest={{ chroot_path }}/etc/systemd/network/10-dhcp-ethernet.network.d/dns.conf owner=root group=root mode=0644 copy: src=dns.conf dest={{ chroot_path }}/etc/systemd/network/10-dhcp-ethernet.network.d/dns.conf owner=root group=root mode=0644
notify: notify:
- Restart networkd - Restart networkd
when: static_dns|default(false) when: static_dns | default(false)
when: dhcp|default(false) when: dhcp | default(false)
- name: Create symlink to resolv.conf - name: Create symlink to resolv.conf
file: src=/run/systemd/resolve/stub-resolv.conf dest={{ chroot_path }}/etc/resolv.conf state=link force=yes follow=no owner=root group=root file: src=/run/systemd/resolve/stub-resolv.conf dest={{ chroot_path }}/etc/resolv.conf state=link force=yes follow=no owner=root group=root
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment