Skip to content

Commit 308d3a8

Browse files
authored
Merge pull request #8 from Zuehlke/feature/update-ansible-tooling
Update ansible tooling
2 parents 147dae6 + 7e097b7 commit 308d3a8

8 files changed

Lines changed: 26 additions & 21 deletions

File tree

.ansible-lint

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
skip_list:
2+
- role-name

roles/ansible-lint/tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22

3-
- name: Install ansible-lint at version 4.2.0
4-
pip: state=present name=ansible-lint version=4.2.0
3+
- name: Install ansible-lint at version 5.0.12
4+
pip: state=present name=ansible-lint version=5.0.12

roles/readme/tasks/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@
1010
file:
1111
path: ~/Desktop
1212
state: directory
13+
mode: 0755
14+
1315
become: yes
1416
become_user: "{{ ansible_env.SUDO_USER }}"
1517

1618
- name: Create the README file on the Desktop
1719
copy:
1820
src: README.md
1921
dest: ~/Desktop/README.md
22+
mode: 0644
2023
become: yes
2124
become_user: "{{ ansible_env.SUDO_USER }}"

roles/testinfra/tasks/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22

3-
- name: Install testinfra at version 5.0.0
4-
pip: state=present name=testinfra version=5.0.0
3+
- name: Install testinfra at version 6.3.0
4+
pip: state=present name=pytest-testinfra version=6.3.0
55

6-
- name: Install pytest-spec formatter at version 2.0.0
7-
pip: state=present name=pytest-spec version=2.0.0
6+
- name: Install pytest-spec formatter at version 3.2.0
7+
pip: state=present name=pytest-spec version=3.2.0

scripts/update-vm.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -e -o pipefail
55

66
# variables
77
REPO_ROOT=~/vm-setup
8-
ANSIBLE_VERSION=2.9.6
8+
ANSIBLE_VERSION=2.9.22
99

1010
# exports
1111
export ANSIBLE_FORCE_COLOR=true
@@ -72,7 +72,7 @@ verify_vm() {
7272
ansible-lint --force-color
7373

7474
step "run integration tests"
75-
py.test -v --color=yes --spec spec/*.py
75+
py.test --color=yes --spec spec/*.py
7676
}
7777

7878
big_step() {

spec/test_ansible.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11

2-
def test_ansible_is_installed_at_version_2_9_6_(host):
2+
def test_ansible_is_installed_at_version_2_9_22_(host):
33
cmd = host.run("pip3 show --disable-pip-version-check ansible")
44
assert cmd.rc is 0
5-
assert "Name: ansible\nVersion: 2.9.6" in cmd.stdout
5+
assert "Name: ansible\nVersion: 2.9.22" in cmd.stdout
66

77
def test_ansible_commands_are_found_(host):
88
assert host.run('which ansible').rc is 0
99
assert host.run('which ansible-playbook').rc is 0
1010

11-
def test_ansible_version_command_reports_version_2_9_6_(host):
12-
assert '2.9.6' in host.run('ansible --version').stdout
11+
def test_ansible_version_command_reports_version_2_9_22_(host):
12+
assert '2.9.22' in host.run('ansible --version').stdout

spec/test_ansible_lint.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

2-
def test_ansible_lint_is_installed_at_version_4_2_0_(host):
2+
def test_ansible_lint_is_installed_at_version_5_0_12_(host):
33
cmd = host.run("pip3 show --disable-pip-version-check ansible-lint")
44
assert cmd.rc is 0
5-
assert "Name: ansible-lint\nVersion: 4.2.0" in cmd.stdout
5+
assert "Name: ansible-lint\nVersion: 5.0.12" in cmd.stdout
66

77
def test_ansible_lint_command_is_found_(host):
88
assert host.run('which ansible-lint').rc is 0
99

10-
def test_ansible_lint_version_command_reports_version_4_2_0_(host):
11-
assert '4.2.0' in host.run('ansible-lint --version').stdout
10+
def test_ansible_lint_version_command_reports_version_5_0_12_(host):
11+
assert '5.0.12' in host.run('ansible-lint --version').stdout

spec/test_testinfra.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11

2-
def test_testinfra_is_installed_at_version_5_0_0_(host):
3-
cmd = host.run("pip3 show --disable-pip-version-check testinfra")
2+
def test_testinfra_is_installed_at_version_6_3_0_(host):
3+
cmd = host.run("pip3 show --disable-pip-version-check pytest-testinfra")
44
assert cmd.rc is 0
5-
assert "Name: testinfra\nVersion: 5.0.0" in cmd.stdout
5+
assert "Name: pytest-testinfra\nVersion: 6.3.0" in cmd.stdout
66

7-
def test_pytest_spec_is_installed_at_version_2_0_0_(host):
7+
def test_pytest_spec_is_installed_at_version_3_2_0_(host):
88
cmd = host.run("pip3 show --disable-pip-version-check pytest-spec")
99
assert cmd.rc is 0
10-
assert "Name: pytest-spec\nVersion: 2.0.0" in cmd.stdout
10+
assert "Name: pytest-spec\nVersion: 3.2.0" in cmd.stdout

0 commit comments

Comments
 (0)