Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Builds failing after fix for #32 #33

Closed
geerlingguy opened this issue Dec 7, 2023 · 3 comments · Fixed by #35
Closed

Builds failing after fix for #32 #33

geerlingguy opened this issue Dec 7, 2023 · 3 comments · Fixed by #35

Comments

@geerlingguy
Copy link
Owner

Ah so fun... #32 fix from #26 fix means CI is failing with:

  TASK [geerlingguy.swap : include_tasks] ****************************************
  fatal: [instance]: FAILED! => {"msg": "The conditional check 'swap_file_state == 'absent' or (swap_file_state == 'present' and swap_file_existing_size_mb != swap_file_size_mb)' failed. The error was: error while evaluating conditional (swap_file_state == 'absent' or (swap_file_state == 'present' and swap_file_existing_size_mb != swap_file_size_mb)): 'swap_file_existing_size_mb' is undefined. 'swap_file_existing_size_mb' is undefined\n\nThe error appears to be in '/home/runner/work/ansible-role-swap/ansible-role-swap/geerlingguy.swap/tasks/main.yml': line 13, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- include_tasks: disable.yml\n  ^ here\n"}
@whysthatso
Copy link

hm, maybe i'm missing something, but i've added:

- name: Set variable if no swap file exists
  set_fact:
    swap_file_existing_size_mb: 0
  when: not swap_file_check.stat.exists

after the first setter and that worked for me. should i make a pr for that?

@mpihelgas
Copy link

I set this in the defaults/main.yml:

swap_file_existing_size_mb: -1

@geerlingguy
Copy link
Owner Author

geerlingguy commented Jan 24, 2024

@whysthatso - Sure! Though see #35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants