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

Ansible: create icons directory #2121

Conversation

jemrobinson
Copy link
Member

@jemrobinson jemrobinson commented Aug 12, 2024

✅ Checklist

  • You have given your pull request a meaningful title (e.g. Enable foobar integration rather than 515 foobar).
  • You are targeting the appropriate branch. If you're not certain which one this is, it should be develop.
  • Your branch is up-to-date with the target branch (it probably was when you started, but it may have changed since then).

🚦 Depends on

n/a

⤴️ Summary

IMPORTANT: I am confident that merging this will not affect the findings of the ongoing penetration test

Create missing /usr/local/share/icons directory in Ansible

🌂 Related issues

n/a

🔬 Tests

Tested on running SRE

@jemrobinson jemrobinson requested review from a team as code owners August 12, 2024 13:11
@jemrobinson jemrobinson changed the base branch from develop to release-v5.0.0 August 12, 2024 13:11
@jemrobinson jemrobinson requested review from craddm and JimMadge August 12, 2024 13:11
Copy link

github-actions bot commented Aug 12, 2024

Coverage report

This PR does not seem to contain any modification to coverable code.

Copy link
Member

@JimMadge JimMadge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you check if

    - name: Copy icons
      ansible.builtin.copy:
        src: "usr/local/share/icons/{{ item }}"
        dest: /usr/local/share/icons/
        mode: '0444'
      loop:
        - gitea.png
        - hedgedoc.png

worked?

Either is way fine I think.

@craddm
Copy link
Contributor

craddm commented Aug 12, 2024

Did you check if

    - name: Copy icons
      ansible.builtin.copy:
        src: "usr/local/share/icons/{{ item }}"
        dest: /usr/local/share/icons/
        mode: '0444'
      loop:
        - gitea.png
        - hedgedoc.png

worked?

Either is way fine I think.

If you mean whether that alone worked with no further changes, that was failing on my VM until I manually created /urs/local/share/icons/

@jemrobinson
Copy link
Member Author

This seems to work

If dest is a non-existent path and if either dest ends with “/” or src is a directory, dest is created.

I'll update the YAML and try again.

@jemrobinson
Copy link
Member Author

@JimMadge : I've simplified a few ansible.builtin.copy tasks to copy everything in src to dest. Unless there's any reason not to do this, I think it's cleaner and minimises the possibility of forgetting to copy a file.

@jemrobinson
Copy link
Member Author

@craddm : I think the trailing / is the thing that triggers whether or not the directory is created.

@jemrobinson jemrobinson merged commit f37a7cb into alan-turing-institute:release-v5.0.0 Aug 12, 2024
11 checks passed
@jemrobinson jemrobinson deleted the create-icons-directory branch January 30, 2025 11:47
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 this pull request may close these issues.

3 participants