forked from jermon/ansible-role-xvfb
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split systemd and systemV to separate files
- Loading branch information
Jerker Montelius
committed
Apr 20, 2017
1 parent
f10ba87
commit c79e411
Showing
3 changed files
with
39 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,20 @@ | ||
--- | ||
# tasks file for xvfb | ||
- name: "Install Xvfb package" | ||
apt: name=xvfb | ||
state=installed | ||
apt: | ||
name: xvfb | ||
state: installed | ||
|
||
- name: "Create Xvfb deamon script" | ||
template: | ||
src=init-xvfb.j2 | ||
dest=/etc/init.d/xvfb | ||
mode=755 | ||
when: ansible_distribution_version == "12.04" | ||
- name: Install for systemV | ||
include: systemv.yml | ||
when: ansible_service_mgr != "systemd" | ||
|
||
- name: "Create Xvfb deamon configuration" | ||
template: | ||
src=systemd-xvfb.j2 | ||
dest=/etc/systemd/system/xvfb.service | ||
mode=755 | ||
when: ansible_distribution_version == "16.04" | ||
- name: Install for systemd | ||
include: systemd.yml | ||
when: ansible_service_mgr == "systemd" | ||
|
||
- name: "Configure display environment variable" | ||
template: | ||
src=profile-xvfb.sh.j2 | ||
dest=/etc/profile.d/xvfb.sh | ||
|
||
- name: "Configure Xvfb automatic startup < 16.04" | ||
service: | ||
name=xvfb | ||
pattern=/usr/bin/Xvfb | ||
enabled=yes | ||
state=started | ||
when: "ansible_distribution_version | version_compare('16.04', '<') " | ||
|
||
- name: "Configure Xvfb automatic startup >= 16.04" | ||
service: | ||
name=xvfb | ||
enabled=yes | ||
state=started | ||
when: "ansible_distribution_version | version_compare('16.04', '>=') " | ||
src: profile-xvfb.sh.j2 | ||
dest: /etc/profile.d/xvfb.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
- name: "systemd - Create Xvfb deamon configuration" | ||
template: | ||
src=systemd-xvfb.j2 | ||
dest=/etc/systemd/system/xvfb.service | ||
mode=755 | ||
|
||
- name: "systemd - Configure Xvfb automatic startup >= 16.04" | ||
service: | ||
name=xvfb | ||
enabled=yes | ||
state=started | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
- name: "systemv - Create Xvfb deamon script" | ||
template: | ||
src=init-xvfb.j2 | ||
dest=/etc/init.d/xvfb | ||
mode=755 | ||
|
||
- name: "systemv - Configure Xvfb automatic startup < 16.04" | ||
service: | ||
name=xvfb | ||
pattern=/usr/bin/Xvfb | ||
enabled=yes | ||
state=started | ||
|