parent
1004727dae
commit
0afc95bb5f
@ -0,0 +1 @@ |
||||
.yamllint |
@ -0,0 +1,17 @@ |
||||
******* |
||||
Vagrant driver installation guide |
||||
******* |
||||
|
||||
Requirements |
||||
============ |
||||
|
||||
* Vagrant |
||||
* Virtualbox, Parallels, VMware Fusion, VMware Workstation or VMware Desktop |
||||
* python-vagrant |
||||
|
||||
Install |
||||
======= |
||||
|
||||
.. code-block:: bash |
||||
|
||||
$ sudo pip install python-vagrant |
@ -0,0 +1,22 @@ |
||||
--- |
||||
dependency: |
||||
name: galaxy |
||||
driver: |
||||
name: vagrant |
||||
provider: |
||||
name: libvirt |
||||
lint: |
||||
name: yamllint |
||||
platforms: |
||||
- name: instance |
||||
box: centos/7 |
||||
provisioner: |
||||
name: ansible |
||||
lint: |
||||
name: ansible-lint |
||||
scenario: |
||||
name: default |
||||
verifier: |
||||
name: testinfra |
||||
lint: |
||||
name: flake8 |
@ -0,0 +1,6 @@ |
||||
--- |
||||
- name: Converge |
||||
hosts: all |
||||
become: true |
||||
roles: |
||||
- role: ansible-cockpit |
@ -0,0 +1,9 @@ |
||||
--- |
||||
- name: Prepare |
||||
hosts: all |
||||
gather_facts: false |
||||
tasks: |
||||
- name: Install python for Ansible |
||||
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) |
||||
become: true |
||||
changed_when: false |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,25 @@ |
||||
import os |
||||
|
||||
import testinfra.utils.ansible_runner |
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( |
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') |
||||
|
||||
|
||||
def test_package_is_installed(host): |
||||
p = host.package('cockpit') |
||||
|
||||
assert p.is_installed |
||||
|
||||
|
||||
def test_service_enabled(host): |
||||
s = host.service('cockpit.socket') |
||||
|
||||
assert s.is_running |
||||
assert s.is_enabled |
||||
|
||||
|
||||
def test_listening(host): |
||||
s = host.socket('tcp://0.0.0.0:9090') |
||||
|
||||
assert s.is_listening |
@ -0,0 +1,17 @@ |
||||
******* |
||||
Vagrant driver installation guide |
||||
******* |
||||
|
||||
Requirements |
||||
============ |
||||
|
||||
* Vagrant |
||||
* Virtualbox, Parallels, VMware Fusion, VMware Workstation or VMware Desktop |
||||
* python-vagrant |
||||
|
||||
Install |
||||
======= |
||||
|
||||
.. code-block:: bash |
||||
|
||||
$ sudo pip install python-vagrant |
@ -0,0 +1,22 @@ |
||||
--- |
||||
dependency: |
||||
name: galaxy |
||||
driver: |
||||
name: vagrant |
||||
provider: |
||||
name: virtualbox |
||||
lint: |
||||
name: yamllint |
||||
platforms: |
||||
- name: instance |
||||
box: centos/7 |
||||
provisioner: |
||||
name: ansible |
||||
lint: |
||||
name: ansible-lint |
||||
scenario: |
||||
name: non_defaults |
||||
verifier: |
||||
name: testinfra |
||||
lint: |
||||
name: flake8 |
@ -0,0 +1,9 @@ |
||||
--- |
||||
- name: Converge |
||||
hosts: all |
||||
become: true |
||||
vars: |
||||
cockpit_listen_port: 9091 |
||||
cockpit_use_selinux: true |
||||
roles: |
||||
- role: ansible-cockpit |
@ -0,0 +1,9 @@ |
||||
--- |
||||
- name: Prepare |
||||
hosts: all |
||||
gather_facts: false |
||||
tasks: |
||||
- name: Install python for Ansible |
||||
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) |
||||
become: true |
||||
changed_when: false |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,25 @@ |
||||
import os |
||||
|
||||
import testinfra.utils.ansible_runner |
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( |
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') |
||||
|
||||
|
||||
def test_package_is_installed(host): |
||||
p = host.package('cockpit') |
||||
|
||||
assert p.is_installed |
||||
|
||||
|
||||
def test_service_enabled(host): |
||||
s = host.service('cockpit.socket') |
||||
|
||||
assert s.is_running |
||||
assert s.is_enabled |
||||
|
||||
|
||||
def test_listening(host): |
||||
s = host.socket('tcp://0.0.0.0:9091') |
||||
|
||||
assert s.is_listening |
Loading…
Reference in new issue