- name: update pacman
  community.general.pacman:
    update_cache: yes
    upgrade: yes
  when: run_once_update_pacman is not defined

- name: run update pacman once
  set_fact:
    run_once_update_pacman: true
  when: run_once_update_pacman is not defined