]> git.phdru.name Git - ansible.git/blobdiff - playbooks/roles/phd/tasks/main.yml
Feat: Combine Debian/RedHat playbooks and roles
[ansible.git] / playbooks / roles / phd / tasks / main.yml
similarity index 85%
rename from playbooks/debian/roles/phd/tasks/main.yml
rename to playbooks/roles/phd/tasks/main.yml
index a26a738cf7af22bece6f41f84bdfbfd51312f2a9..cb36caa7276bb51b725765e795f14361c1f3af50 100644 (file)
         path: /etc/aliases
         regexp: "^root: phd$"
         line: "root: phd"
+      when: ansible_facts.os_family == 'Debian'
   when: phd_exists.results|selectattr('stat.exists')|list|length != 2
+
+- name: Add alias
+  become: true
+  lineinfile:
+    path: /etc/aliases
+    regexp: "^root:            phd$"
+    line: "root:               phd"
+  when: ansible_facts.os_family == 'RedHat'