2020-01-07 19:50:03 +00:00
- name : upgrade arch-keyring
2018-12-01 18:12:12 +00:00
pacman :
2020-01-07 19:44:20 +00:00
state: latest # not required. choices : absent;latest;present. Desired state of the package.
2020-01-07 19:50:03 +00:00
name : archlinux-keyring
2020-01-07 19:44:20 +00:00
force : true # not required. When removing package - force remove package, without any checks. When update_cache - force redownload repo databases.
2020-01-07 19:50:03 +00:00
update_cache : false
2019-04-10 18:27:12 +00:00
become : yes
2020-01-13 19:04:49 +00:00
when : system_upgrade and ansible_facts['os_family'] == "Archlinux"
2019-10-24 19:16:17 +00:00
- name : upgrade system
pacman :
state: latest # not required. choices : absent;latest;present. Desired state of the package.
upgrade : true # not required. Whether or not to upgrade whole system.
force : true # not required. When removing package - force remove package, without any checks. When update_cache - force redownload repo databases.
update_cache : false
become : yes
2020-01-13 19:04:49 +00:00
when : system_upgrade and ansible_facts['os_family'] == "Archlinux"
2019-10-24 19:16:17 +00:00
register : upgrade
- name : Reboot updates to apply
reboot :
reboot_timeout : 3600
2020-01-13 19:04:49 +00:00
when : upgrade.changed and "linux" in upgrade.packages and system_upgrade and ansible_facts['os_family'] == "Archlinux"
2020-01-07 19:44:20 +00:00
become : yes
2020-01-07 19:50:03 +00:00
- name : launch arch base install software
2020-01-07 19:44:20 +00:00
pacman :
state: present # not required. choices : absent;latest;present. Desired state of the package.
2019-09-18 21:14:11 +00:00
name : "{{system_base_softwares_arch}}"
2019-04-10 18:27:12 +00:00
become : yes
2019-09-18 21:14:11 +00:00
when : ansible_facts['os_family'] == "Archlinux"
2020-01-07 19:50:03 +00:00
- name : launch debian base install software
2019-09-18 21:14:11 +00:00
apt :
state: present # not required. choices : absent;latest;present. Desired state of the package.
name : "{{system_base_softwares_debian}}"
2019-11-24 13:46:38 +00:00
update_cache : yes
2020-01-07 19:44:20 +00:00
become : yes
2019-09-18 21:14:11 +00:00
when : ansible_facts['os_family'] == "Debian"
2020-01-07 19:44:20 +00:00
- name : install powerline status via pip
pip :
name : powerline-status # not required. The name of a Python library to install or the url(bzr+,hg+,git+,svn+) of the remote package.,This can be a list (since 2.2) and contain version specifiers (since 2.7).
extra_args : --user
2019-09-22 10:49:16 +00:00
- name : GITHUB | Get current version of bat
shell : >
warn=False
curl --silent https://github.com/sharkdp/bat/releases/latest |
grep 'tag' |
sed -E 's/.*v([0-9].[0-9][0-9].[0-9]).*/\1/'
2019-10-03 19:22:20 +00:00
register : bat_version
2019-09-22 10:49:16 +00:00
failed_when : >
2019-10-03 19:22:20 +00:00
bat_version.rc != 0 or
not bat_version.stdout|regex_search('\w+\.\w+\.\w+')
2019-09-22 10:49:16 +00:00
when : ansible_facts['os_family'] == "Debian"
- name : DEBIAN | Set URL to download bins
set_fact :
2019-10-03 19:22:20 +00:00
debian_url : "https://github.com/sharkdp/bat/releases/download/v{{ bat_version.stdout }}/bat_{{ bat_version.stdout }}_amd64.deb"
2019-09-22 10:49:16 +00:00
when : ansible_facts['os_family'] == "Debian"
- name : DEBIAN | Install deb from github
become : true
apt :
deb : "{{debian_url}}"
2019-11-24 13:49:14 +00:00
when : ansible_facts['os_family'] == "Debian"
2019-10-24 19:16:17 +00:00