diff --git a/Pipfile b/Pipfile index f48e0fe..fcb4d84 100644 --- a/Pipfile +++ b/Pipfile @@ -7,9 +7,9 @@ name = "pypi" pre_commit = "*" [packages] -molecule = "*" -docker-py = "*" +molecule = {extras = ["docker"],version = "*"} ansible-lint = "*" +yamllint = "*" [requires] python_version = "2.7" diff --git a/molecule/default/playbook.yml b/molecule/default/converge.yml similarity index 58% rename from molecule/default/playbook.yml rename to molecule/default/converge.yml index 5fb9c4f..b25ccbb 100644 --- a/molecule/default/playbook.yml +++ b/molecule/default/converge.yml @@ -1,24 +1,13 @@ --- -- hosts: all - tasks: - - debug: - msg: "System {{ inventory_hostname }} has OS {{ ansible_distribution}}-{{ ansible_distribution_major_version }}" - -- hosts: all - tasks: - - name: create a group of all hosts by operating system - group_by: - key: "{{ ansible_distribution}}-{{ ansible_distribution_major_version }}" - -- hosts: CentOS-6 +- hosts: CentOS_6 tasks: - name: install initscripts package: name: initscripts state: present -- hosts: CentOS-7 +- hosts: CentOS_7 tasks: - name: remove requiretty from /etc/sudoers lineinfile: diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 6eeea3e..ddf5112 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -26,12 +26,12 @@ platforms: image: milcom/centos7-systemd:latest privileged: True -ansible: - playbook: playbook.yml +# ansible: +# playbook: playbook.yml -lint: - name: yamllint - enabled: False +# lint: +# name: yamllint +# enabled: False provisioner: name: ansible @@ -75,8 +75,10 @@ provisioner: SHUTDOWN_WAIT: 2 wildfly_temp_dir: /opt/wildfly/standalone/tmp - lint: - name: ansible-lint + lint: | + set -e + yamllint . + ansible-lint scenario: name: default diff --git a/molecule/default/prepare.yml b/molecule/default/prepare.yml new file mode 100644 index 0000000..b555373 --- /dev/null +++ b/molecule/default/prepare.yml @@ -0,0 +1,12 @@ +--- + +- hosts: all + tasks: + - debug: + msg: "System {{ inventory_hostname }} has OS {{ ansible_distribution}}-{{ ansible_distribution_major_version }}" + +- hosts: all + tasks: + - name: create a group of all hosts by operating system + group_by: + key: "{{ ansible_distribution}}_{{ ansible_distribution_major_version }}" \ No newline at end of file