X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=XTesting%2Fkubespray%2Fansible_version.yml;fp=XTesting%2Fkubespray%2Fansible_version.yml;h=151131f8bb486caf2b5656497bfcf8f983527885;hb=31af17bb5935b722dcf59d5800aaff9e789cfa93;hp=0000000000000000000000000000000000000000;hpb=c8bda4f07b7e87beb2aa3d8729f9b0b456d4da6f;p=it%2Ftest.git diff --git a/XTesting/kubespray/ansible_version.yml b/XTesting/kubespray/ansible_version.yml new file mode 100644 index 0000000..151131f --- /dev/null +++ b/XTesting/kubespray/ansible_version.yml @@ -0,0 +1,33 @@ +--- +- hosts: localhost + gather_facts: false + become: no + vars: + minimal_ansible_version: 2.11.0 + maximal_ansible_version: 2.13.0 + ansible_connection: local + tags: always + tasks: + - name: "Check {{ minimal_ansible_version }} <= Ansible version < {{ maximal_ansible_version }}" + assert: + msg: "Ansible must be between {{ minimal_ansible_version }} and {{ maximal_ansible_version }} exclusive" + that: + - ansible_version.string is version(minimal_ansible_version, ">=") + - ansible_version.string is version(maximal_ansible_version, "<") + tags: + - check + + - name: "Check that python netaddr is installed" + assert: + msg: "Python netaddr is not present" + that: "'127.0.0.1' | ipaddr" + tags: + - check + + # CentOS 7 provides too old jinja version + - name: "Check that jinja is not too old (install via pip)" + assert: + msg: "Your Jinja version is too old, install via pip" + that: "{% set test %}It works{% endset %}{{ test == 'It works' }}" + tags: + - check