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

Update centos8 wildfly20.0.1 #73

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ name = "pypi"
pre_commit = "*"

[packages]
molecule = "*"
docker-py = "*"
molecule = {extras = ["docker"],version = "*"}
ansible-lint = "*"
yamllint = "*"

[requires]
python_version = "2.7"
13 changes: 10 additions & 3 deletions molecule/default/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@ FROM {{ item.registry.url }}/{{ item.image }}
{% else %}
FROM {{ item.image }}
{% endif %}

ENV ANSIBLE_USER=ansible SUDO_GROUP=wheel DEPLOY_GROUP=deployer
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get upgrade -y && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python2-dnf bash && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum update -y && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python3 sudo python3-devel python3-dnf bash && dnf clean all \
&& set -xe \
&& groupadd -r ${ANSIBLE_USER} \
&& groupadd -r ${DEPLOY_GROUP} \
&& useradd -m -g ${ANSIBLE_USER} ${ANSIBLE_USER} \
&& usermod -aG ${SUDO_GROUP} ${ANSIBLE_USER} \
&& usermod -aG ${DEPLOY_GROUP} ${ANSIBLE_USER} \
&& sed -i "/^%${SUDO_GROUP}/s/ALL\$/NOPASSWD:ALL/g" /etc/sudoers; \
elif [ $(command -v yum) ]; then yum makecache fast && yum update -y && yum install -y python firewalld sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper update -y && zypper install -y python sudo bash python-xml && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates && xbps-remove -O; fi
20 changes: 20 additions & 0 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---

- hosts: CentOS_7
tasks:
- name: remove requiretty from /etc/sudoers
lineinfile:
dest: "/etc/sudoers"
regexp: "requiretty$"
state: absent

- hosts: all
become: yes
any_errors_fatal: true
pre_tasks:
- debug:
msg: "wildfly_remove_download_file is {{ wildfly_remove_download_file }}"
- debug:
msg: "wildfly_version is {{ wildfly_version }}"
roles:
- role: inkatze.wildfly
32 changes: 15 additions & 17 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@ driver:
name: docker

platforms:
- name: wildfly-centos6-8.2.1
image: centos:6.8

- name: wildfly-centos6-9.0.1
image: centos:6.8

- name: wildfly-centos6-10.1.0
image: centos:6.8

- name: wildfly-centos7-8.2.1
image: milcom/centos7-systemd:latest
privileged: True
Expand All @@ -26,12 +17,14 @@ platforms:
image: milcom/centos7-systemd:latest
privileged: True

ansible:
playbook: playbook.yml

lint:
name: yamllint
enabled: False
- name: wildfly-centos8-20.0.1
image: centos:8
command: /sbin/init
tmpfs:
- /run
- /tmp
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro

provisioner:
name: ansible
Expand Down Expand Up @@ -59,6 +52,9 @@ provisioner:
wildfly_version: 9.0.1.Final
wildfly-centos7-10.1.0:
wildfly_version: 10.1.0.Final
wildfly-centos8-20.0.1:
ansible_user: ansible
wildfly_version: 20.0.1.Final
group_vars:
all:
wildfly_remove_download_file: False
Expand All @@ -75,8 +71,10 @@ provisioner:
SHUTDOWN_WAIT: 2
wildfly_temp_dir: /opt/wildfly/standalone/tmp

lint:
name: ansible-lint
lint: |
set -e
yamllint .
ansible-lint

scenario:
name: default
37 changes: 0 additions & 37 deletions molecule/default/playbook.yml

This file was deleted.

12 changes: 12 additions & 0 deletions molecule/default/prepare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---

- hosts: all
tasks:
- debug:
msg: "System {{ inventory_hostname }} has OS {{ ansible_distribution}}-{{ ansible_distribution_major_version }}"

- hosts: all
tasks:
- name: create a group of all hosts by operating system
group_by:
key: "{{ ansible_distribution}}_{{ ansible_distribution_major_version }}"