Skip to content

Commit

Permalink
Merge pull request #3 from cisagov/improvement/split-xfce-into-separa…
Browse files Browse the repository at this point in the history
…te-role

Split the Xfce foo into a separate role
  • Loading branch information
jsf9k authored Mar 6, 2020
2 parents 184c592 + a29419b commit 2257dd5
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 42 deletions.
4 changes: 2 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

# The VNC username
username: vnc
# The VNC password
password: vnc_password
# Generate a random VNC password and save it to /tmp
password: "{{ lookup('password', '/tmp/vnc_password.txt') }}"
4 changes: 0 additions & 4 deletions files/xstartup

This file was deleted.

6 changes: 3 additions & 3 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ galaxy_info:
license: CC0
min_ansible_version: 2.0
platforms:
# - name: Amazon
# versions:
# - 2
- name: Amazon
versions:
- 2
- name: Debian
versions:
- stretch
Expand Down
14 changes: 7 additions & 7 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ driver:
lint:
name: yamllint
platforms:
# - name: amazonlinux2_systemd
# image: geerlingguy/docker-amazonlinux2-ansible:latest
# privileged: yes
# volumes:
# - /sys/fs/cgroup:/sys/fs/cgroup:ro
# command: /lib/systemd/systemd
# pre_build_image: yes
- name: amazonlinux2_systemd
image: geerlingguy/docker-amazonlinux2-ansible:latest
privileged: yes
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
command: /lib/systemd/systemd
pre_build_image: yes
- name: debian9_systemd
image: geerlingguy/docker-debian9-ansible:latest
privileged: yes
Expand Down
10 changes: 0 additions & 10 deletions molecule/default/prepare.yml

This file was deleted.

14 changes: 3 additions & 11 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@
paths:
- "vars"

- name: Install Xfce desktop environment and TigerVNC server
- name: Install TigerVNC server
package:
name:
"{{ package_names }}"

# Does this go here? Can this be generalized?
- name: Disable screen locking
file:
path: /etc/xdg/autostart/light-locker.desktop
Expand Down Expand Up @@ -54,14 +55,6 @@
group: "{{ username }}"
mode: 0600

- name: Deploy xstartup configuration file for VNC user
copy:
src: xstartup
dest: /home/{{ username }}/.vnc/
owner: "{{ username }}"
group: "{{ username }}"
mode: 0744

- name: Set up VNC as a systemd service
template:
src: [email protected]
Expand All @@ -74,10 +67,9 @@
when:
- ansible_service_mgr == "systemd"

- name: Start VNC systemd service and enable it to start on boot
- name: Enable VNC systemd service
systemd:
name: "[email protected]"
state: started
enabled: true
when:
- ansible_service_mgr == "systemd"
6 changes: 6 additions & 0 deletions vars/Amazon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
# vars file for Amazon Linux

# The TigerVNC package names
package_names:
- tigervnc-server
4 changes: 1 addition & 3 deletions vars/Debian.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
---
# vars file for Debian

# The Xfce and TigerVNC package names
# The TigerVNC package names
package_names:
- xfce4
- xfce4-goodies
- tigervnc-standalone-server
- tigervnc-common
3 changes: 1 addition & 2 deletions vars/RedHat.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
# vars file for RedHat

# The Xfce and TigerVNC package names
# The TigerVNC package names
package_names:
- '@xfce-desktop-environment'
- tigervnc-server

0 comments on commit 2257dd5

Please sign in to comment.