1
0
mirror of https://github.com/eoli3n/dotfiles synced 2024-11-22 23:12:32 +01:00

fixed root limit

This commit is contained in:
eoli3n 2017-12-29 03:14:04 +01:00
parent 8c5886e9b3
commit 68efff64ad

@ -1,8 +1,8 @@
---
- hosts: all
tags: [ 'server', 'laptop', 'desktop' ]
pre_tasks:
tags: server
tasks:
- name: Limit to Archlinux/Debian/Centos/FreeBSD
fail:
msg: "{{ ansible_distribution }} is not supported with this tag."
@ -11,6 +11,23 @@
(ansible_distribution != "Archlinux") and
(ansible_distribution != "FreeBSD")
- hosts: all
tags: [ 'desktop', 'laptop' ]
tasks:
- name: Limit to Archlinux
fail:
msg: "{{ ansible_distribution }} is not supported with this tag."
when: ansible_distribution != "Archlinux"
- name: Limit to user account
fail:
msg: "Don't run as root."
when: ansible_user_id == "root"
- hosts: all
tags: [ 'server', 'laptop', 'desktop' ]
roles:
- { role: packages-common, tags: packages-common }
- { role: zsh, tags: zsh }
@ -22,17 +39,6 @@
- hosts: all
tags: [ 'desktop', 'laptop' ]
pre_tasks:
- name: Limit to Archlinux
fail:
msg: "{{ ansible_distribution }} is not supported with this tag."
when: ansible_distribution != "Archlinux"
- name: Limit to user account
fail:
msg: "Don't run as root."
when: ansible_user_id == "root"
roles:
- { role: packages-desktop, tags: packages-desktop }
- { role: cursor, tags: cursor }