1
0

aur builder become changes

This commit is contained in:
= 2025-04-05 00:07:14 -04:00
parent c12dfc18ce
commit 2b56d30666

View File

@ -140,16 +140,14 @@
update_cache: false update_cache: false
- name: Build aurutils - name: Build aurutils
become: true
become_user: "{{ aur_repo_build_account }}"
ansible.builtin.command: ansible.builtin.command:
cmd: makepkg cmd: makepkg
chdir: /tmp/aurutils chdir: /tmp/aurutils
creates: "{{ aur_repo_dir }}/packages/aurutils-{{ aurutils_pkgver }}-{{ aurutils_pkgrel }}-{{ aurutils_arch }}.pkg.tar" creates: "{{ aur_repo_dir }}/packages/aurutils-{{ aurutils_pkgver }}-{{ aurutils_pkgrel }}-{{ aurutils_arch }}.pkg.tar"
vars:
ansible_become_user: "{{ aur_repo_build_account }}"
- name: Update repo database - name: Update repo database
become: true
become_user: "{{ aur_repo_build_account }}"
ansible.builtin.command: ansible.builtin.command:
argv: argv:
- repo-add - repo-add
@ -162,6 +160,8 @@
- aurutils-{{ aurutils_pkgver }}-{{ aurutils_pkgrel }}-{{ aurutils_arch }}.pkg.tar - aurutils-{{ aurutils_pkgver }}-{{ aurutils_pkgrel }}-{{ aurutils_arch }}.pkg.tar
chdir: "{{ aur_repo_dir }}/packages" chdir: "{{ aur_repo_dir }}/packages"
changed_when: true changed_when: true
vars:
ansible_become_user: "{{ aur_repo_build_account }}"
- name: Check if the signing key is in pacman keyring - name: Check if the signing key is in pacman keyring
ansible.builtin.command: ansible.builtin.command:
@ -212,13 +212,13 @@
state: present state: present
update_cache: true update_cache: true
- name: Enable the multilib repository # - name: Enable the multilib repository
ansible.builtin.replace: # ansible.builtin.replace:
path: /etc/pacman.conf # path: /etc/pacman.conf
backup: true # backup: true
regexp: '^[#]?\[multilib\]\n[#]?Include = \/etc\/pacman.d\/mirrorlist$' # regexp: '^[#]?\[multilib\]\n[#]?Include = \/etc\/pacman.d\/mirrorlist$'
replace: '[multilib]\nInclude = /etc/pacman.d/mirrorlist' # replace: '[multilib]\nInclude = /etc/pacman.d/mirrorlist'
register: multilib_enable # register: multilib_enable
- name: Update the package database # noqa: no-handler - name: Update the package database # noqa: no-handler
when: multilib_enable.changed when: multilib_enable.changed
@ -226,14 +226,14 @@
update_cache: true update_cache: true
- name: Sync AUR packages - name: Sync AUR packages
become: true
become_user: "{{ aur_repo_build_account }}"
ansible.builtin.command: ansible.builtin.command:
cmd: aur sync --no-view -CnrS {{ item }} cmd: aur sync --no-view -CnrS {{ item }}
loop: "{{ aur_repo_host_packages }}" loop: "{{ aur_repo_host_packages }}"
register: aur_sync_result register: aur_sync_result
changed_when: (aur_sync_result.stderr_lines | last | replace(':','')) != "sync there is nothing to do" changed_when: (aur_sync_result.stderr_lines | last | replace(':','')) != "sync there is nothing to do"
failed_when: aur_sync_result.rc != 0 failed_when: aur_sync_result.rc != 0
vars:
ansible_become_user: "{{ aur_repo_build_account }}"
- name: Add the root www folder if it doesn't exist - name: Add the root www folder if it doesn't exist
ansible.builtin.file: ansible.builtin.file: