You've already forked ansible-docker
							
							Compare commits
	
		
			1 Commits
		
	
	
		
			0.2.0
			...
			e806dbba70
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| e806dbba70 | 
| @@ -3,9 +3,9 @@ name: Build | ||||
| on: | ||||
|   pull_request: | ||||
|     types: | ||||
|     - opened | ||||
|     - reopened | ||||
|     - synchronize | ||||
|     - "opened" | ||||
|     - "reopened" | ||||
|     - "synchronize" | ||||
|   push: | ||||
|     branches: | ||||
|     - master | ||||
| @@ -15,9 +15,9 @@ jobs: | ||||
|   build-arch-linux: | ||||
|     runs-on: ubuntu-latest-amd64 | ||||
|     steps: | ||||
|     - uses: actions/checkout@v4.3.0 | ||||
|       - uses: actions/checkout@v4.2.2 | ||||
|       - uses: docker/setup-qemu-action@v3.6.0 | ||||
|     - uses: docker/setup-buildx-action@v3.11.1 | ||||
|       - uses: docker/setup-buildx-action@v3.10.0 | ||||
|  | ||||
|       - name: Build image | ||||
|         run: | | ||||
| @@ -31,9 +31,9 @@ jobs: | ||||
|   build-rocky-linux-8: | ||||
|     runs-on: ubuntu-latest-amd64 | ||||
|     steps: | ||||
|     - uses: actions/checkout@v4.3.0 | ||||
|       - uses: actions/checkout@v4.2.2 | ||||
|       - uses: docker/setup-qemu-action@v3.6.0 | ||||
|     - uses: docker/setup-buildx-action@v3.11.1 | ||||
|       - uses: docker/setup-buildx-action@v3.10.0 | ||||
|  | ||||
|       - name: Build image | ||||
|         run: | | ||||
| @@ -43,19 +43,3 @@ jobs: | ||||
|             --file Dockerfile.rockylinux8 \ | ||||
|             --tag git.cryptic.systems/volker.raschek/ansible:${TAG}-rockylinux-8 \ | ||||
|             . | ||||
|  | ||||
|   build-rocky-linux-9: | ||||
|     runs-on: ubuntu-latest-amd64 | ||||
|     steps: | ||||
|     - uses: actions/checkout@v4.3.0 | ||||
|     - uses: docker/setup-qemu-action@v3.6.0 | ||||
|     - uses: docker/setup-buildx-action@v3.11.1 | ||||
|  | ||||
|     - name: Build image | ||||
|       run: | | ||||
|         TAG=latest | ||||
|  | ||||
|         docker buildx build \ | ||||
|           --file Dockerfile.rockylinux9 \ | ||||
|           --tag git.cryptic.systems/volker.raschek/ansible:${TAG}-rockylinux-9 \ | ||||
|           . | ||||
|   | ||||
| @@ -1,22 +0,0 @@ | ||||
| name: 'Lint Markdown files' | ||||
|  | ||||
| on: | ||||
|   pull_request: | ||||
|     types: | ||||
|     - opened | ||||
|     - reopened | ||||
|     - synchronize | ||||
|   push: | ||||
|     branches: | ||||
|     - master | ||||
|   workflow_dispatch: {} | ||||
|  | ||||
| jobs: | ||||
|   markdown-lint: | ||||
|     runs-on: | ||||
|     - ubuntu-latest | ||||
|     steps: | ||||
|     - uses: actions/checkout@v4.3.0 | ||||
|     - uses: DavidAnson/markdownlint-cli2-action@v20.0.0 | ||||
|       with: | ||||
|         globs: '**/*.md' | ||||
| @@ -9,11 +9,11 @@ jobs: | ||||
|   push-arch-linux: | ||||
|     runs-on: ubuntu-latest-amd64 | ||||
|     steps: | ||||
|     - uses: actions/checkout@v4.3.0 | ||||
|       - uses: actions/checkout@v4.2.2 | ||||
|       - uses: docker/setup-qemu-action@v3.6.0 | ||||
|     - uses: docker/setup-buildx-action@v3.11.1 | ||||
|       - uses: docker/setup-buildx-action@v3.10.0 | ||||
|  | ||||
|     - uses: docker/login-action@v3.5.0 | ||||
|       - uses: docker/login-action@v3.4.0 | ||||
|         with: | ||||
|           registry: git.cryptic.systems | ||||
|           username: ${{ github.repository_owner }} | ||||
| @@ -21,7 +21,7 @@ jobs: | ||||
|  | ||||
|       - name: Build and push image | ||||
|         run: | | ||||
|         TAG=$(echo ${{ github.ref_name }} | sed 's/v//gm') | ||||
|           TAG=latest | ||||
|  | ||||
|           docker buildx build \ | ||||
|             --file Dockerfile.archlinux \ | ||||
| @@ -32,11 +32,11 @@ jobs: | ||||
|   push-rocky-linux-8: | ||||
|     runs-on: ubuntu-latest-amd64 | ||||
|     steps: | ||||
|     - uses: actions/checkout@v4.3.0 | ||||
|       - uses: actions/checkout@v4.2.2 | ||||
|       - uses: docker/setup-qemu-action@v3.6.0 | ||||
|     - uses: docker/setup-buildx-action@v3.11.1 | ||||
|       - uses: docker/setup-buildx-action@v3.10.0 | ||||
|  | ||||
|     - uses: docker/login-action@v3.5.0 | ||||
|       - uses: docker/login-action@v3.4.0 | ||||
|         with: | ||||
|           registry: git.cryptic.systems | ||||
|           username: ${{ github.repository_owner }} | ||||
| @@ -44,7 +44,7 @@ jobs: | ||||
|  | ||||
|       - name: Build and push image | ||||
|         run: | | ||||
|         TAG=$(echo ${{ github.ref_name }} | sed 's/v//gm') | ||||
|           TAG=latest | ||||
|  | ||||
|           docker buildx build \ | ||||
|             --file Dockerfile.rockylinux8 \ | ||||
| @@ -52,34 +52,10 @@ jobs: | ||||
|             --tag git.cryptic.systems/volker.raschek/ansible:${TAG}-rockylinux-8 \ | ||||
|             . | ||||
|  | ||||
|   push-rocky-linux-9: | ||||
|     runs-on: ubuntu-latest-amd64 | ||||
|     steps: | ||||
|     - uses: actions/checkout@v4.3.0 | ||||
|     - uses: docker/setup-qemu-action@v3.6.0 | ||||
|     - uses: docker/setup-buildx-action@v3.11.1 | ||||
|  | ||||
|     - uses: docker/login-action@v3.5.0 | ||||
|       with: | ||||
|         registry: git.cryptic.systems | ||||
|         username: ${{ github.repository_owner }} | ||||
|         password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }} | ||||
|  | ||||
|     - name: Build and push image | ||||
|       run: | | ||||
|         TAG=$(echo ${{ github.ref_name }} | sed 's/v//gm') | ||||
|  | ||||
|         docker buildx build \ | ||||
|           --file Dockerfile.rockylinux9 \ | ||||
|           --push \ | ||||
|           --tag git.cryptic.systems/volker.raschek/ansible:${TAG}-rockylinux-9 \ | ||||
|           . | ||||
|  | ||||
|   sync-to-hub-docker-io: | ||||
|     needs: | ||||
|     - push-arch-linux | ||||
|     - push-rocky-linux-8 | ||||
|     - push-rocky-linux-9 | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|     - name: Copy images to docker.io | ||||
| @@ -89,7 +65,7 @@ jobs: | ||||
|         apt-get update --yes | ||||
|         apt-get install --yes skopeo | ||||
|  | ||||
|         for suffix in archlinux rockylinux-8 rockylinux-9; do | ||||
|         for suffix in archlinux rockylinux-8; do | ||||
|           skopeo copy \ | ||||
|             --all \ | ||||
|             --dest-password ${{ secrets.DOCKER_IO_PASSWORD }} \ | ||||
|   | ||||
| @@ -6,14 +6,13 @@ on: | ||||
|     - master | ||||
|     paths: | ||||
|     - README.md | ||||
|   workflow_dispatch: {} | ||||
|  | ||||
| jobs: | ||||
|   update-description-on-hub-docker-io: | ||||
|     runs-on: | ||||
|     - ubuntu-latest | ||||
|     steps: | ||||
|     - uses: actions/checkout@v4.3.0 | ||||
|     - uses: actions/checkout@v4.2.2 | ||||
|     - uses: peter-evans/dockerhub-description@v4.0.2 | ||||
|       with: | ||||
|         username: ${{ secrets.DOCKER_IO_USERNAME }} | ||||
|   | ||||
| @@ -68,6 +68,11 @@ MD022: | ||||
|   # Blank lines below heading | ||||
|   lines_below: 1 | ||||
|  | ||||
| # MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content | ||||
| MD024: | ||||
|   # Only check sibling headings | ||||
|   allow_different_nesting: true | ||||
|  | ||||
| # MD025/single-title/single-h1 - Multiple top-level headings in the same document | ||||
| MD025: | ||||
|   # Heading level | ||||
| @@ -122,6 +127,7 @@ MD041: | ||||
| MD044: | ||||
|   # List of proper names | ||||
|   names: [] | ||||
|   # - some-thing | ||||
|   # Include code blocks | ||||
|   code_blocks: false | ||||
|  | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| FROM docker.io/library/rockylinux:8 | ||||
| FROM docker.io/library/rockylinux:9 | ||||
|  | ||||
| RUN dnf update --assumeyes && \ | ||||
|     dnf install --assumeyes bash-completion sudo && \ | ||||
| @@ -12,12 +12,11 @@ RUN dnf update --assumeyes && \ | ||||
|  | ||||
| # We must change python to 3.12 (default 3.6), to be compliant with ansible-core. Furthermore, we must upgrade pip to | ||||
| # latest version. Otherwise is still used pip for python 3.6. At least, we install boto3, which is required for the aws | ||||
| # dynamic inventory manually, because the official python-boto3 package is for python 3.6. At least, we install | ||||
| # ansible-lint via pip to be able to lint ansible roles. | ||||
| # dynamic inventory manually, because the official python-boto3 package is for python 3.6. | ||||
| RUN alternatives --set python3 /usr/bin/python3.12 && \ | ||||
|     curl --fail --silent --location https://bootstrap.pypa.io/get-pip.py --output get-pip.py && \ | ||||
|     python3 get-pip.py && \ | ||||
|     pip install ansible-lint boto3 | ||||
|     pip install boto3 | ||||
|  | ||||
| # Create default ansible inventory file | ||||
| RUN mkdir --parents /etc/ansible | ||||
|   | ||||
| @@ -1,30 +0,0 @@ | ||||
| FROM docker.io/library/rockylinux:9 | ||||
|  | ||||
| RUN dnf update --assumeyes && \ | ||||
|     dnf install --assumeyes bash-completion sudo && \ | ||||
|     dnf install --assumeyes epel-release && \ | ||||
|     dnf install --assumeyes ansible-core && \ | ||||
|     dnf install --assumeyes python3.12 python3-boto3 python3-botocore && \ | ||||
|     dnf remove --assumeyes epel-release && \ | ||||
|     dnf clean all | ||||
|  | ||||
| # We must change python to 3.12 (default 3.9), to be compliant with ansible-core. Furthermore, we must upgrade pip to | ||||
| # latest version. Otherwise is still used pip for python 3.9. At least, we install boto3, which is required for the aws | ||||
| # dynamic inventory manually, because the official python-boto3 package is for python 3.9. At least, we install | ||||
| # ansible-lint via pip to be able to lint ansible roles. | ||||
| RUN ln --symbolic --force /usr/bin/python3.12 /usr/bin/python3 && \ | ||||
|     curl --fail --silent --location https://bootstrap.pypa.io/get-pip.py --output get-pip.py && \ | ||||
|     python3 get-pip.py && \ | ||||
|     pip install ansible-lint boto3 | ||||
|  | ||||
| # Create default ansible inventory file | ||||
| RUN mkdir --parents /etc/ansible | ||||
| RUN echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts | ||||
|  | ||||
| # Remove unnecessary getty and udev targets that result in high CPU usage when | ||||
| # using multiple containers with molecule | ||||
| # (https://github.com/ansible/molecule/issues/1104) | ||||
| RUN rm --recursive --force /lib/systemd/system/systemd*udev* && \ | ||||
|     rm --recursive --force /lib/systemd/system/getty.target | ||||
|  | ||||
| VOLUME [ "/sys/fs/cgroup", "/tmp", "/run"] | ||||
							
								
								
									
										33
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										33
									
								
								Makefile
									
									
									
									
									
								
							| @@ -21,15 +21,6 @@ ANSIBLE_RL8_IMAGE_VERSION?=latest | ||||
| ANSIBLE_RL8_IMAGE_VERSION_SUFFIX=rockylinux-8 | ||||
| ANSIBLE_RL8_IMAGE_FULLY_QUALIFIED=${ANSIBLE_RL8_IMAGE_REGISTRY_HOST}/${ANSIBLE_RL8_IMAGE_NAMESPACE}/${ANSIBLE_RL8_IMAGE_REPOSITORY}:${ANSIBLE_RL8_IMAGE_VERSION}-${ANSIBLE_RL8_IMAGE_VERSION_SUFFIX} | ||||
|  | ||||
| # RockyLinux9 | ||||
| ANSIBLE_RL9_IMAGE_REGISTRY_HOST?=git.cryptic.systems | ||||
| ANSIBLE_RL9_IMAGE_REGISTRY_USER?=volker.raschek | ||||
| ANSIBLE_RL9_IMAGE_NAMESPACE?=${ANSIBLE_RL8_IMAGE_REGISTRY_USER} | ||||
| ANSIBLE_RL9_IMAGE_REPOSITORY:=ansible | ||||
| ANSIBLE_RL9_IMAGE_VERSION?=latest | ||||
| ANSIBLE_RL9_IMAGE_VERSION_SUFFIX=rockylinux-9 | ||||
| ANSIBLE_RL9_IMAGE_FULLY_QUALIFIED=${ANSIBLE_RL9_IMAGE_REGISTRY_HOST}/${ANSIBLE_RL9_IMAGE_NAMESPACE}/${ANSIBLE_RL9_IMAGE_REPOSITORY}:${ANSIBLE_RL9_IMAGE_VERSION}-${ANSIBLE_RL9_IMAGE_VERSION_SUFFIX} | ||||
|  | ||||
| # BUILD ANSIBLE ARCHLINUX CONTAINER IMAGE | ||||
| # ============================================================================== | ||||
| PHONY:=container-image/build/arch-linux | ||||
| @@ -78,30 +69,6 @@ container-image/push/rocky-linux-8: | ||||
| 	echo ${ANSIBLE_ARCH_IMAGE_REGISTRY_PASSWORD} | ${CONTAINER_RUNTIME} login ${ANSIBLE_ARCH_IMAGE_REGISTRY_HOST} --username ${ANSIBLE_ARCH_IMAGE_REGISTRY_USER} --password-stdin | ||||
| 	${CONTAINER_RUNTIME} push ${ANSIBLE_ARCH_IMAGE_FULLY_QUALIFIED} | ||||
|  | ||||
| # BUILD ANSIBLE RL9 CONTAINER IMAGE | ||||
| # ============================================================================== | ||||
| PHONY:=container-image/build/rocky-linux-9 | ||||
| container-image/build/rocky-linux-9: | ||||
| 	${CONTAINER_RUNTIME} build \ | ||||
| 		--file Dockerfile.rockylinux9 \ | ||||
| 		--no-cache \ | ||||
| 		--pull \ | ||||
| 		--tag ${ANSIBLE_RL9_IMAGE_FULLY_QUALIFIED} \ | ||||
| 		. | ||||
|  | ||||
| # DELETE ANSIBLE RL9 CONTAINER IMAGE | ||||
| # ============================================================================== | ||||
| PHONY:=container-image/delete/rocky-linux-9 | ||||
| container-image/delete/rocky-linux-9: | ||||
| 	- ${CONTAINER_RUNTIME} image rm ${ANSIBLE_RL9_IMAGE_FULLY_QUALIFIED} | ||||
|  | ||||
| # PUSH ANSIBLE RL9 CONTAINER IMAGE | ||||
| # ============================================================================== | ||||
| PHONY+=container-image/push/rocky-linux-9 | ||||
| container-image/push/rocky-linux-9: | ||||
| 	echo ${ANSIBLE_ARCH_IMAGE_REGISTRY_PASSWORD} | ${CONTAINER_RUNTIME} login ${ANSIBLE_ARCH_IMAGE_REGISTRY_HOST} --username ${ANSIBLE_ARCH_IMAGE_REGISTRY_USER} --password-stdin | ||||
| 	${CONTAINER_RUNTIME} push ${ANSIBLE_ARCH_IMAGE_FULLY_QUALIFIED} | ||||
|  | ||||
| # PHONY | ||||
| # ============================================================================== | ||||
| # Declare the contents of the PHONY variable as phony.  We keep that information | ||||
|   | ||||
| @@ -16,6 +16,6 @@ docker run \ | ||||
|   --rm \ | ||||
|   --volume $(pwd):$(pwd) \ | ||||
|   --workdir $(pwd) \ | ||||
|     git.cryptic.systems/volker.raschek/ansible:latest \ | ||||
|     git.cryptic.systems/volkerraschek/ansible:latest \ | ||||
|       bash -c "ansible-galaxy install -r requirements.yaml && ansible-playbook -i inventories/demo.aws_ec2.yaml aws.yaml" | ||||
| ``` | ||||
|   | ||||
		Reference in New Issue
	
	Block a user