Vagrant-based testing environment #111
|
@ -1,3 +0,0 @@
|
|||
---
|
||||
- name: Gather facts
|
||||
gather_facts:
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
- import_tasks: ssh.yml
|
||||
- import_tasks: ssh-port.yml
|
||||
tags: [change-ssh-port]
|
||||
- import_tasks: facts.yml
|
||||
tags: [gather-facts]
|
||||
- import_tasks: virtualization.yml
|
||||
tags: [gather-virtualization-facts]
|
||||
- import_tasks: dell-apt-repo.yml
|
||||
tags: [setup-dell-apt-repo]
|
||||
when: ansible_virtualization_role != "guest"
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
set_fact:
|
||||
ansible_port: 22
|
||||
when: ssh_configured is defined and
|
||||
(ssh_configured.state is undefined or
|
||||
(ssh_configured.state is defined and
|
||||
ssh_configured.state != "started")) and
|
||||
ssh_configured.state is undefined and
|
||||
ansible_port != 2222
|
||||
|
||||
- name: Change SSH port on host
|
||||
|
@ -29,9 +27,7 @@
|
|||
register: ssh_changed
|
||||
notify: "Restart sshd"
|
||||
when: ssh_configured is defined and
|
||||
(ssh_configured.state is undefined or
|
||||
(ssh_configured.state is defined and
|
||||
ssh_configured.state != "started"))
|
||||
ssh_configured.state is undefined
|
||||
|
||||
- name: Ensure sshd is reloaded if needed
|
||||
meta: flush_handlers
|
4
roles/ubuntu_base/tasks/virtualization.yml
Normal file
4
roles/ubuntu_base/tasks/virtualization.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
- name: Find out if running in a VM
|
||||
setup:
|
||||
gather_subset: virtualization_role
|
Loading…
Reference in a new issue