2016-12-04 10:02:05 +08:00
|
|
|
---
|
|
|
|
|
|
|
|
- hosts: all
|
|
|
|
gather_facts: true
|
|
|
|
become: yes
|
|
|
|
tasks:
|
|
|
|
|
2016-12-07 04:23:12 +08:00
|
|
|
- name: check if it is Atomic host
|
|
|
|
stat: path=/run/ostree-booted
|
|
|
|
register: stat_ostree
|
2017-10-12 21:29:41 +08:00
|
|
|
tags:
|
|
|
|
- always
|
2016-12-07 04:23:12 +08:00
|
|
|
|
|
|
|
- name: set fact for using Atomic host
|
|
|
|
set_fact:
|
|
|
|
is_atomic: '{{ stat_ostree.stat.exists }}'
|
|
|
|
|
2016-12-07 04:24:36 +08:00
|
|
|
# we need to install this so the Socket testinfra module
|
|
|
|
# can use netcat for testing
|
2016-12-07 04:23:12 +08:00
|
|
|
- name: install net-tools
|
|
|
|
package:
|
|
|
|
name: net-tools
|
|
|
|
state: present
|
|
|
|
when:
|
|
|
|
- not is_atomic
|