From 19778c6a413c3753b1bf40e251049b479293800c Mon Sep 17 00:00:00 2001 From: Sufijen Bani Date: Tue, 31 Mar 2015 19:08:11 +0200 Subject: [PATCH] Add RedHat support and close #1 --- meta/main.yml | 11 +++++++++-- tasks/all-user.yml | 6 ++++++ tasks/{all-users.yml => all-user/debian.yml} | 0 tasks/all-user/redhat.yml | 12 ++++++++++++ 4 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 tasks/all-user.yml rename tasks/{all-users.yml => all-user/debian.yml} (100%) create mode 100644 tasks/all-user/redhat.yml diff --git a/meta/main.yml b/meta/main.yml index a5eebe2..e906609 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -6,8 +6,15 @@ galaxy_info: license: MIT min_ansible_version: 1.5 platforms: - - name: Ubuntu + - name: EL versions: - - all + - 6 + - 7 + - name: Ubuntu + versions: + - all + - name: Debian + versions: + - all categories: - system \ No newline at end of file diff --git a/tasks/all-user.yml b/tasks/all-user.yml new file mode 100644 index 0000000..2351a28 --- /dev/null +++ b/tasks/all-user.yml @@ -0,0 +1,6 @@ +--- +- include: all-user/redhat.yml + when: ansible_os_family == 'RedHat' + +- include: all-user/debian.yml + when: ansible_os_family == 'Debian' \ No newline at end of file diff --git a/tasks/all-users.yml b/tasks/all-user/debian.yml similarity index 100% rename from tasks/all-users.yml rename to tasks/all-user/debian.yml diff --git a/tasks/all-user/redhat.yml b/tasks/all-user/redhat.yml new file mode 100644 index 0000000..7088dd1 --- /dev/null +++ b/tasks/all-user/redhat.yml @@ -0,0 +1,12 @@ +--- + +# Option 1: Add liquidprompt to all users + +- name: Copy template + template: src=liquidprompt.bashrc.j2 dest=/etc/liquidprompt.bashrc owner=root + +- name: Add source file to bashrc + lineinfile: + dest: /etc/bashrc + line: "source /etc/liquidprompt.bashrc" + owner: root