1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2025-01-18 08:06:16 +01:00
infrastructure/playbooks/tasks/pacman-website.yml
Giancarlo Razzolini 48b3687031 plabooks: Change the archweb db variable to point to archlinux.org
Change the archweb_db_host variable to point to archlinux.org instead of
apollo. This is of particular importance to gemini.
2020-12-20 11:21:31 +00:00

34 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