1
1
Fork 0
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2024-05-05 16:26:03 +02:00
infrastructure/playbooks/tasks/pacman-website.yml
Kristian Klausen 4112bdf9fd Make ansible-lint happy
yaml: truthy value should be one of [false, true] (truthy)
yaml: wrong indentation: expected 4 but found 2 (indentation)
yaml: too few spaces before comment (comments)
yaml: missing starting space in comment (comments)
yaml: too many blank lines (1 > 0) (empty-lines)
yaml: too many spaces after colon (colons)
yaml: comment not indented like content (comments-indentation)
yaml: no new line character at the end of file (new-line-at-end-of-file)
load-failure: Failed to load or parse file
parser-error: couldn't resolve module/action 'hosts'. This often indicates a misspelling, missing collection, or incorrect module path.
2021-02-14 14:22:05 +01:00

33 lines
1.2 KiB
YAML

---
- name: Update pacman website
hosts: localhost
vars:
pacman_version: "5.2.1"
archweb_dir: '/srv/http/archweb'
tasks:
- name: Create temp dir
tempfile: state=directory suffix=pacman
register: tempdir
- name: fetch pacman tarball
get_url: url=https://sources.archlinux.org/other/pacman/pacman-{{ pacman_version }}.tar.gz dest={{ tempdir.path }}/pacman.tar.gz
- name: create extraction dir
file: path={{ tempdir.path }}/pacman state=directory owner=root group=root mode=0755
- name: unpack tarball
unarchive: src={{ tempdir.path }}/pacman.tar.gz dest={{ tempdir.path }}/pacman/ owner=root group=root mode=0755
- name: configure
command: ./configure chdir={{ tempdir.path }}/pacman/pacman-{{ pacman_version }}
register: configure
changed_when: "configure.rc == 0"
- name: make
make: chdir={{ tempdir.path }}/pacman/pacman-{{ pacman_version }}/doc target=website
- name: upload website
unarchive: src={{ tempdir.path }}/pacman/pacman-{{ pacman_version }}/doc/website.tar.gz dest={{ archweb_dir }}/archlinux.org/pacman mode=0644
delegate_to: archlinux.org