fix some bug in system role

This commit is contained in:
vincent 2019-01-08 22:04:00 +01:00
parent d14da91b70
commit 8fdb217174
4 changed files with 20 additions and 3 deletions

View File

@ -5,7 +5,9 @@
- name: Update keymap
command: localectl set-keymap {{ arch_base_keymap }}
- name: Update pacman repos
- name: Update_pacman_repos
become: yes
pacman: update_cache=yes
- name: Restart sshd
service: name=sshd state=restarted

View File

@ -3,6 +3,7 @@
state: present # not required. choices: absent;latest;present. Desired state of the package.
upgrade: false # not required. Whether or not to upgrade whole system.
name: ['base-devel'] # not required. Name or list of names of the packages to install, upgrade, or remove.
update_cache: yes
become: yes
- name: Create aur_builder user
@ -24,5 +25,6 @@
skip_installed: True
name: yay
use: makepkg
skip_pgp_check: yes
become: yes
become_user: aur_builder

View File

@ -1,7 +1,7 @@
---
- include_tasks: hostname.yml
- include_tasks: locales.yml
- include_tasks: pacman.yml
- include_tasks: time.yml
- include_tasks: pacman.yml
- include_tasks: AUR_builder.yml
- include_tasks: base_software.yml

View File

@ -2,11 +2,24 @@
- name: Configure pacman color
replace: dest=/etc/pacman.conf regexp="^#(Color)" replace="\1"
become: yes
- name: Configure more pacman visuals
replace: dest=/etc/pacman.conf regexp="#(VerbosePkgLists)" replace="\1\nILoveCandy"
become: yes
- name: Configure pacman multilib repo
become: yes
replace: dest=/etc/pacman.conf regexp="^#(\[multilib\])\n^#(.*)$" replace="\1\n\2"
notify: Update_pacman_repos
when: ansible_architecture == "x86_64"
notify: Update pacman repos
- name: stat ca-certificates
stat:
path: "/etc/certs/ca-certificates.crt" # required. The full path of the file/object to get the facts of.
register: cacertificates
- name: reinstall certificate for old system
command: "pacman -Sy ca-certificates-utils openssl --noconfirm"
become: yes
when: not cacertificates.stat.exists