-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af60262
commit 8848080
Showing
12 changed files
with
295 additions
and
43 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
|
||
name: ansible | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- wip/next | ||
|
||
jobs: | ||
|
||
ansible-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ansible/ansible-lint-action@v6 | ||
|
||
molecule: | ||
needs: | ||
- ansible-lint | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
distro: | ||
- centos-7 | ||
- centos-8 | ||
- debian-buster | ||
- debian-bullseye | ||
- debian-bookworm | ||
- rocky-8 | ||
- rocky-9 | ||
- ubuntu-bionic | ||
- ubuntu-focal | ||
- ubuntu-jammy | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
- run: pip3 install ansible molecule molecule-plugins[docker] docker | ||
- run: molecule test -p ${{ matrix.distro }} | ||
env: | ||
PY_COLORS: '1' | ||
|
||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
|
||
- name: converge | ||
hosts: all | ||
tasks: | ||
- name: include the role | ||
ansible.builtin.include_role: | ||
name: idiv_biodiversity.lmod | ||
|
||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
--- | ||
|
||
dependency: | ||
name: galaxy | ||
|
||
driver: | ||
name: docker | ||
|
||
platforms: | ||
|
||
- name: centos-7 | ||
image: geerlingguy/docker-centos7-ansible | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:rw | ||
cgroupns_mode: host | ||
privileged: yes | ||
pre_build_image: yes | ||
|
||
- name: centos-8 | ||
image: geerlingguy/docker-centos8-ansible | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:rw | ||
cgroupns_mode: host | ||
privileged: yes | ||
pre_build_image: yes | ||
|
||
- name: debian-buster | ||
image: geerlingguy/docker-debian10-ansible | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:rw | ||
cgroupns_mode: host | ||
privileged: yes | ||
pre_build_image: yes | ||
|
||
- name: debian-bullseye | ||
image: geerlingguy/docker-debian11-ansible | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:rw | ||
cgroupns_mode: host | ||
privileged: yes | ||
pre_build_image: yes | ||
|
||
- name: debian-bookworm | ||
image: geerlingguy/docker-debian12-ansible | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:rw | ||
cgroupns_mode: host | ||
privileged: yes | ||
pre_build_image: yes | ||
|
||
- name: rocky-8 | ||
image: geerlingguy/docker-rockylinux8-ansible | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:rw | ||
cgroupns_mode: host | ||
privileged: yes | ||
pre_build_image: yes | ||
|
||
- name: rocky-9 | ||
image: geerlingguy/docker-rockylinux9-ansible | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:rw | ||
cgroupns_mode: host | ||
privileged: yes | ||
pre_build_image: yes | ||
|
||
- name: ubuntu-bionic | ||
image: geerlingguy/docker-ubuntu1804-ansible | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:rw | ||
cgroupns_mode: host | ||
privileged: yes | ||
pre_build_image: yes | ||
|
||
- name: ubuntu-focal | ||
image: geerlingguy/docker-ubuntu2004-ansible | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:rw | ||
cgroupns_mode: host | ||
privileged: yes | ||
pre_build_image: yes | ||
|
||
- name: ubuntu-jammy | ||
image: geerlingguy/docker-ubuntu2204-ansible | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:rw | ||
cgroupns_mode: host | ||
privileged: yes | ||
pre_build_image: yes | ||
|
||
provisioner: | ||
name: ansible | ||
inventory: | ||
group_vars: | ||
all: | ||
lmod_install: yes | ||
|
||
verifier: | ||
name: ansible | ||
|
||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
|
||
- name: verify | ||
hosts: all | ||
tasks: | ||
|
||
- name: run some module commands | ||
ansible.builtin.shell: >- | ||
. /etc/profile.d/z00-lmod.sh && | ||
module --terse list && | ||
module load lmod && | ||
module --terse list | ||
args: | ||
executable: /bin/bash | ||
changed_when: no | ||
register: __lmod_bash_module_commands | ||
|
||
- name: debug module commands | ||
ansible.builtin.debug: | ||
var: __lmod_bash_module_commands | ||
|
||
- name: assert on module commands | ||
ansible.builtin.assert: | ||
that: | ||
- not __lmod_bash_module_commands.failed | ||
- '"No modules loaded" in __lmod_bash_module_commands.stderr_lines[0]' | ||
- '"lmod" in __lmod_bash_module_commands.stderr_lines[1]' | ||
success_msg: 'module list works' | ||
|
||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
|
||
collections: | ||
|
||
- name: community.general | ||
|
||
roles: | ||
|
||
- name: geerlingguy.repo-epel | ||
|
||
... |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
|
||
- name: 'install dependencies {{ __lmod_dependencies }}' | ||
ansible.builtin.package: | ||
name: '{{ __lmod_dependencies }}' | ||
become: yes | ||
|
||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
--- | ||
|
||
- name: install lmod dependencies | ||
- name: 'install dependencies {{ __lmod_dependencies }}' | ||
ansible.builtin.yum: | ||
pkg: '{{ __lmod_dependencies | join(",") }}' | ||
enablerepo: '{{ __lmod_os_repos | join(",") }}' | ||
name: '{{ __lmod_dependencies }}' | ||
enablerepo: '{{ __lmod_os_repos }}' | ||
become: yes | ||
|
||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
|
||
- name: 'install dependencies {{ __lmod_dependencies }}' | ||
ansible.builtin.apt: | ||
name: '{{ __lmod_dependencies }}' | ||
become: yes | ||
|
||
# ----------------------------------------------------------------------------- | ||
# bionic hacks documented here | ||
# https://github.com/TACC/Lmod/commit/1d15717144f595b9a09e8421aa00b5dead3ed21d | ||
# ----------------------------------------------------------------------------- | ||
|
||
- name: make lua5.3 the default | ||
community.general.alternatives: | ||
name: lua-interpreter | ||
link: /usr/bin/lua | ||
path: /usr/bin/lua5.3 | ||
priority: 130 | ||
subcommands: | ||
- name: lua-manual | ||
link: /usr/share/man/man1/lua.1.gz | ||
path: /usr/share/man/man1/lua5.3.1.gz | ||
|
||
- name: make luac5.3 the default | ||
community.general.alternatives: | ||
name: lua-compiler | ||
link: /usr/bin/luac | ||
path: /usr/bin/luac5.3 | ||
priority: 130 | ||
subcommands: | ||
- name: lua-compiler-manual | ||
link: /usr/share/man/man1/luac.1.gz | ||
path: /usr/share/man/man1/luac5.3.1.gz | ||
|
||
- name: fix lua-posix symlink | ||
ansible.builtin.file: | ||
src: /usr/lib/x86_64-linux-gnu/liblua5.3-posix.so | ||
dest: /usr/lib/x86_64-linux-gnu/lua/5.3/posix.so | ||
state: link | ||
become: yes | ||
|
||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters