Browse Source

option to add aurrepo optionally

master
Jörg Thalheim 6 years ago
parent
commit
1070603a9c
  1. 1
      roles/aurrepo/defaults/main.yml
  2. 5
      roles/aurrepo/tasks/main.yml
  3. 4
      roles/aurrepo/templates/pacman.conf.j2

1
roles/aurrepo/defaults/main.yml

@ -0,0 +1 @@
add_repo_in_pacman_conf: true

5
roles/aurrepo/tasks/main.yml

@ -1,13 +1,10 @@
- name: Write pacman.conf
copy: src=pacman.conf dest=/etc/pacman.conf
template: src=pacman.conf.j2 dest=/etc/pacman.conf mode=0644
- name: Write mirrorlist
copy: src=mirrorlist dest=/etc/pacman.d/mirrorlist
- name: Copy Custom Repo GPG key
copy: src=repo-gpg.asc dest=/etc/pacman.d/repo-gpg.asc
register: repo_gpg
- name: Import repo gpg key
action: command /usr/bin/pacman-key --add /etc/pacman.d/repo-gpg.asc
when: repo_gpg.changed
- name: Sign repo gpg key
action: command /usr/bin/pacman-key --lsign CEEFA661
when: repo_gpg.changed

4
roles/aurrepo/files/pacman.conf → roles/aurrepo/templates/pacman.conf.j2

@ -24,7 +24,7 @@ CleanMethod = KeepCurrent
Architecture = auto
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg =
IgnorePkg = linux-lts linux-lts-headers spl-lts spl-utils-lts zfs-lts zfs-utils-lts
#IgnoreGroup =
#NoUpgrade =
@ -97,5 +97,7 @@ Include = /etc/pacman.d/mirrorlist
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
{% if add_repo_in_pacman_conf %}
[repo]
Server = file:///srv/repo
{% endif %}
Loading…
Cancel
Save