Skip to content

Commit

Permalink
Merge pull request #7 from hellofresh/feature/trusty-support
Browse files Browse the repository at this point in the history
PTII-273 Add ubuntu trusty support
  • Loading branch information
antonu17 authored Mar 7, 2018
2 parents e262f01 + 8e84d30 commit 1c70ac5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
6 changes: 5 additions & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ driver:
lint:
name: yamllint
platforms:
- name: ubuntu-trusty
image: ubuntu-upstart
command: /sbin/init
privileged: True
- name: ubuntu-xenial
image: solita/ubuntu-systemd:latest
image: solita/ubuntu-systemd
command: /sbin/init
privileged: True
capabilities:
Expand Down
10 changes: 8 additions & 2 deletions molecule/default/tests/test_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ def test_sssd_service_state(host):


def test_sshd_service_state(host):
assert host.service('sshd').is_enabled
assert host.service('sshd').is_running
ssh_service_name = {
'centos': 'sshd',
'ubuntu': 'ssh'
}
assert host.service(
ssh_service_name[host.system_info.distribution]).is_enabled
assert host.service(
ssh_service_name[host.system_info.distribution]).is_running


def test_ssh_access(host):
Expand Down
7 changes: 6 additions & 1 deletion tasks/sshd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,10 @@

- name: sshd | ensure sshd service is enabled
service:
name: sshd
name: "{{ sssd_ldap_ssh_service }}"
enabled: true

- name: sshd | ensure sshd service is started
service:
name: "{{ sssd_ldap_ssh_service }}"
state: started

0 comments on commit 1c70ac5

Please sign in to comment.