Skip to content

Commit

Permalink
version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
bodsch committed Sep 16, 2024
1 parent ef1b50b commit f3b6af7
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# E221 multiple spaces before operator
# E251 unexpected spaces around keyword / parameter equals

ignore = E221,E251
# ignore = E221,E251

exclude =
# No need to traverse our git directory
Expand Down
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---

trivy_version: 0.51.1
trivy_version: 0.55.1

trivy_direct_download: false

Expand Down
18 changes: 9 additions & 9 deletions molecule/default/tests/test_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def read_ansible_yaml(file_name, role_name):
read_file = None

for e in ["yml", "yaml"]:
test_file = "{}.{}".format(file_name, e)
test_file = f"{file_name}.{e}"
if os.path.isfile(test_file):
read_file = test_file
break
Expand Down Expand Up @@ -76,16 +76,16 @@ def get_vars(host):
# print(" -> {} / {}".format(distribution, os))
# print(" -> {}".format(base_dir))

file_defaults = read_ansible_yaml(f"{base_dir}/defaults/main", "role_defaults")
file_vars = read_ansible_yaml(f"{base_dir}/vars/main", "role_vars")
file_distibution = read_ansible_yaml(f"{base_dir}/vars/{operation_system}", "role_distibution")
file_molecule = read_ansible_yaml(f"{molecule_dir}/group_vars/all/vars", "test_vars")
file_defaults = read_ansible_yaml(f"{base_dir}/defaults/main", "role_defaults")
file_vars = read_ansible_yaml(f"{base_dir}/vars/main", "role_vars")
file_distibution = read_ansible_yaml(f"{base_dir}/vars/{operation_system}", "role_distibution")
file_molecule = read_ansible_yaml(f"{molecule_dir}/group_vars/all/vars", "test_vars")
# file_host_molecule = read_ansible_yaml("{}/host_vars/{}/vars".format(base_dir, HOST), "host_vars")

defaults_vars = host.ansible("include_vars", file_defaults).get("ansible_facts").get("role_defaults")
vars_vars = host.ansible("include_vars", file_vars).get("ansible_facts").get("role_vars")
distibution_vars = host.ansible("include_vars", file_distibution).get("ansible_facts").get("role_distibution")
molecule_vars = host.ansible("include_vars", file_molecule).get("ansible_facts").get("test_vars")
defaults_vars = host.ansible("include_vars", file_defaults).get("ansible_facts").get("role_defaults")
vars_vars = host.ansible("include_vars", file_vars).get("ansible_facts").get("role_vars")
distibution_vars = host.ansible("include_vars", file_distibution).get("ansible_facts").get("role_distibution")
molecule_vars = host.ansible("include_vars", file_molecule).get("ansible_facts").get("test_vars")
# host_vars = host.ansible("include_vars", file_host_molecule).get("ansible_facts").get("host_vars")

ansible_vars = defaults_vars
Expand Down
18 changes: 9 additions & 9 deletions molecule/latest/tests/test_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def read_ansible_yaml(file_name, role_name):
read_file = None

for e in ["yml", "yaml"]:
test_file = "{}.{}".format(file_name, e)
test_file = f"{file_name}.{e}"
if os.path.isfile(test_file):
read_file = test_file
break
Expand Down Expand Up @@ -76,16 +76,16 @@ def get_vars(host):
# print(" -> {} / {}".format(distribution, os))
# print(" -> {}".format(base_dir))

file_defaults = read_ansible_yaml(f"{base_dir}/defaults/main", "role_defaults")
file_vars = read_ansible_yaml(f"{base_dir}/vars/main", "role_vars")
file_distibution = read_ansible_yaml(f"{base_dir}/vars/{operation_system}", "role_distibution")
file_molecule = read_ansible_yaml(f"{molecule_dir}/group_vars/all/vars", "test_vars")
file_defaults = read_ansible_yaml(f"{base_dir}/defaults/main", "role_defaults")
file_vars = read_ansible_yaml(f"{base_dir}/vars/main", "role_vars")
file_distibution = read_ansible_yaml(f"{base_dir}/vars/{operation_system}", "role_distibution")
file_molecule = read_ansible_yaml(f"{molecule_dir}/group_vars/all/vars", "test_vars")
# file_host_molecule = read_ansible_yaml("{}/host_vars/{}/vars".format(base_dir, HOST), "host_vars")

defaults_vars = host.ansible("include_vars", file_defaults).get("ansible_facts").get("role_defaults")
vars_vars = host.ansible("include_vars", file_vars).get("ansible_facts").get("role_vars")
distibution_vars = host.ansible("include_vars", file_distibution).get("ansible_facts").get("role_distibution")
molecule_vars = host.ansible("include_vars", file_molecule).get("ansible_facts").get("test_vars")
defaults_vars = host.ansible("include_vars", file_defaults).get("ansible_facts").get("role_defaults")
vars_vars = host.ansible("include_vars", file_vars).get("ansible_facts").get("role_vars")
distibution_vars = host.ansible("include_vars", file_distibution).get("ansible_facts").get("role_distibution")
molecule_vars = host.ansible("include_vars", file_molecule).get("ansible_facts").get("test_vars")
# host_vars = host.ansible("include_vars", file_host_molecule).get("ansible_facts").get("host_vars")

ansible_vars = defaults_vars
Expand Down

0 comments on commit f3b6af7

Please sign in to comment.