Skip to content

Commit

Permalink
Set core file in DockerStatic role
Browse files Browse the repository at this point in the history
Signed-off-by: Stewart X Addison <[email protected]>
  • Loading branch information
sxa committed Feb 12, 2021
1 parent aed49ac commit a1ebdfe
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
roles:
- Debug
- Version
- adopt_etc
- Providers # AdoptOpenJDK Infrastructure
- Get_Vendor_Files
- Jenkins_User # AdoptOpenJDK Infrastructure
- Superuser # AdoptOpenJDK Infrastructure
- adopt_etc
- role: Swap_File
- role: Crontab
- role: NTP_TIME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,40 @@
##############################################################

- name: Start Ubuntu 16.04 container if not already started
command: docker run -p 2222:22 --cpus=2.0 --memory=6G --detach --name U1604_2222 aqa_u1604
command: docker run --restart unless-stopped -p 2222:22 --cpus=2.0 --memory=6G --detach --name U1604_2222 aqa_u1604
tags: startcontainers
ignore_errors: yes

- name: Start Ubuntu 18.04 container if not already started
command: docker run -p 2223:22 --cpus=4.0 --memory=6G --detach --name U1804_2223 aqa_u1804
command: docker run --restart unless-stopped -p 2223:22 --cpus=4.0 --memory=6G --detach --name U1804_2223 aqa_u1804
tags: startcontainers, startallcontainers
ignore_errors: yes

- name: Start Ubuntu 20.04 container if not already started
command: docker run -p 2224:22 --cpus=2.0 --memory=6G --detach --name U2004_2224 aqa_u2004
command: docker run --restart unless-stopped -p 2224:22 --cpus=2.0 --memory=6G --detach --name U2004_2224 aqa_u2004
tags: startcontainers
ignore_errors: yes

- name: Start Ubuntu 20.10 container if not already started
command: docker run -p 2225:22 --cpus=4.0 --memory=6G --detach --name U2010_2225 aqa_u2010
command: docker run --restart unless-stopped -p 2225:22 --cpus=4.0 --memory=6G --detach --name U2010_2225 aqa_u2010
tags: startcontainers, startallcontainers
ignore_errors: yes

- name: Start fedora 33 container if not already started
command: docker run -p 2227:22 --cpus=2.0 --memory=6G --detach --name f33.2227 aqa_f33
command: docker run --restart unless-stopped -p 2227:22 --cpus=2.0 --memory=6G --detach --name f33.2227 aqa_f33
tags: startcontainers
ignore_errors: yes

# lineinfile does not work here - similar to the operation in /var/log in adopt_etc
# lineinfile: path /proc/sys/kernel/core_pattern state: present: regexp: . line: core.%p
# therefore the following section wil not become live prior to a reboot
#
- name: Make core file setting live immediately;
command: "echo core.%p > /proc/sys/kernel/core_pattern"

- name: Ensure core files are able to be created within docker containers on reboot
lineinfile:
path: /etc/sysctl.conf
state: present
regexp: kernel_core_pattern
line: kernel.core_pattern=core.%p

0 comments on commit a1ebdfe

Please sign in to comment.