Vagrant-based testing environment #111

Merged
valberg merged 15 commits from vagrant into main 2022-11-25 13:07:10 +00:00
4 changed files with 9 additions and 12 deletions
Showing only changes of commit c74cc4413a - Show all commits

View File

@ -1,3 +0,0 @@
---
- name: Gather facts
gather_facts:

View File

@ -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"

View File

@ -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

View File

@ -0,0 +1,4 @@
---
- name: Find out if running in a VM
setup:
gather_subset: virtualization_role