Questions tagged [molecule]

Molecule is a Python package designed to aid in the development and testing of Ansible roles.

Molecule is a Python package designed to aid in the development and testing of Ansible roles. It includes support for multiple instances, operating system distributions, virtualization providers, and test frameworks.

It leverages Vagrant, Docker, and OpenStack to manage virtual machines/containers, with support for multiple Vagrant providers (currently VirtualBox, Parallels, VMware Fusion, and Libvirt). Molecule supports Serverspec, Testinfra, or Goss (beta) to run tests. Molecule uses an Ansible playbook (playbook.yml), to execute the role and its tests.

Find the source on Github and the documentation on the official website.

139 questions
0
votes
1 answer

How to draw sub-structures of a polycyclic aromatic which shows bond angles correctly?

thank you for reading my question. Assume that I have a polycyclic aromatic (let's call it "parent molecule") as shown below: smile = "c1ccc2ocnc2c1" mol = Chem.MolFromSmiles(smile) When I draw sub-structures of the parent molecule, I notice…
Mohammad
  • 775
  • 1
  • 14
  • 37
0
votes
0 answers

Testing Acme.sh with Ansible molecule

I have the following Ansible playbook to issue and install certificate: - name: Issue certificate shell: acme.sh --issue --dns dns_acmeproxy -d {{ server_name }} - name: Install certificate shell: >- acme.sh --dns dns_acmeproxy -d {{…
Kirill
  • 33
  • 5
0
votes
0 answers

Ansible Molecule Test Error: cannot reload udev rules: exit status 1

I'm trying to set up Ansible molecule for testing roles on different OSes. For example, this role is failing when it gets to the task that installs with snap install…
0
votes
1 answer

Testing Ansible-Roles using Ansible Tower

I'm starting a new project and the client uses Ansible Tower. I will be working on Playbook/Role development and will need to do extensive testing. My question is: Does Ansible Tower support testing with Molecule and if so, where can I find…
Keith
  • 51
  • 2
  • 9
0
votes
1 answer

How to generate ECFP hashing folding data?

I'm trying to convert chemical structures to ECFP data. Buy, I have a problem with the folding steps. I understand all of the processes of generating ECFP data through D. Rogers and M. Hahn's paper (J. Chem. Inf. Model., Vol. 50, No. 5, 2010) I…
0
votes
1 answer

How to delete files inside a directory without deleting the directory with Ansible?

I am trying 2 methods to delete all files inside a directory my_dir. This is a parameter managed from another file. My workflow is creating the directory first, then copy files in that directory, then delete all files in there. So here is my first…
Shuti
  • 169
  • 1
  • 4
  • 18
0
votes
1 answer

ansible molecule docker service does not start

I have ansible playbook working, however while trying to test it with molecule, I cannot get docker service started. Here is what I have in molecule.yml platforms: - name: instance image: oraclelinux:7 command: /usr/sbin/init tmpfs: - /run …
iDev
  • 2,163
  • 10
  • 39
  • 64
0
votes
1 answer

How do I get molecule to follow include_tasks correctly

TASK [Test: Install Test Authentication] *********************************** fatal: [ubuntu2004]: FAILED! => {"reason": "Could not find or access '/home/test/test.playbook/molecule/default/test.yaml' on the Ansible Controller."} Molecule handles…
0
votes
2 answers

CIS Hardening 1.1.6 Ensure separate partition exists for /var

I've been working on automating the CIS benchmark guidelines on CentOS8 using Ansible, Molecule on Vagrant. I've been referencing the ansible scripts of repos such as https://github.com/MindPointGroup/RHEL7-CIS and is facing problem on point "1.1.6…
bryan
  • 1
  • 1
  • 1
0
votes
0 answers

Same command through Ansible shell module produces a different result from direct execution in terminal

I am battling with an existing ansible MongoDB role that I am updating with ansible-molecule. The full role folder, with tasks/molecul files, is simplified and uploaded to gofile . That can be downloaded and simulated. It's virus free and the md5sum…
black sensei
  • 6,528
  • 22
  • 109
  • 188
0
votes
1 answer

Adding residue IDs to a numpy array consisting of time series data of water coordinates

I got this script for generating time series data of water molecules, and I want to add one more header row to that generated matrix with residue IDs of water molecules. Could anybody help with with reworking this script? Thanks! import numpy as…
iqra khan
  • 45
  • 1
  • 6
0
votes
1 answer

Corrupted state.yml file on Ansible Molecule test

On running molecule to test my Ansible changes. I was receiving an error with the state.yml file. As shown: $ molecule test ERROR: while scanning a simple key in "/tmp/molecule/my_module/default/state.yml", line 8, column 1 could not find…
Keir Whitlock
  • 101
  • 1
  • 5
0
votes
1 answer

Output 'def' headings when using verifier = testinfra

I am using testinfra as the verifier, when executing testinfra, it only outputs 'Collected x items followed by the py test file... and [100%] pass. How do you see all individual items that were tested? Is there an option I have to set?
Taz 3497
  • 15
  • 3
0
votes
1 answer

Molecule : Testing roles : Failed to get Dbus Connection Operation not permitted

I facing an issue on my Molecule Test. I have begin to study this tool 2 days ago for information. on a Ubuntu VM running with Vagrant,I have create a role and initialze Molecule's folder and create a testinfra test file ( with the docker provider…
Baki7512
  • 1
  • 1
0
votes
1 answer

Run molecule bash command in flask project

I have following code structure flask project |->app1->here I'm writing following code |->app2 ansible project |->roles->myrole->molecule |-> Playbooks I want to check ansible roles linting so I'm using python molecule package for this import…
NIKHIL RANE
  • 4,012
  • 2
  • 22
  • 45