Compare commits

...

5 Commits

Author SHA1 Message Date
AnsibleGuy 2d13301250
updated user-input matching 2024-05-04 18:20:21 +02:00
AnsibleGuy 3efa639a11
molecule fix systemd-boot 2024-05-04 16:33:22 +02:00
AnsibleGuy 7958e28c21
molecule apt-cache fix 2024-05-04 16:31:41 +02:00
AnsibleGuy 77b6ea1efc
updated molecule docker-image 2024-05-04 16:19:19 +02:00
AnsibleGuy 8c220ddeaf
molecule debian11 => 12 2024-05-04 14:37:24 +02:00
4 changed files with 12 additions and 22 deletions

View File

@ -1,14 +0,0 @@
# docker build -t mantest - < ./Dockerfile.j2
# docker run -it --privileged --name mantest mantest:latest /sbin/init --tmpfs /tmp --tmpfs /run --tmpfs /run/lock
FROM debian:11-slim
ENV container docker
ENV LC_ALL C
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
&& apt-get install -y systemd systemd-sysv python3 sudo \
&& apt-get clean
CMD ["/sbin/init"]

View File

@ -15,13 +15,8 @@ platforms:
- name: 'test-ag-apache' - name: 'test-ag-apache'
ipv4_address: '192.168.11.1' ipv4_address: '192.168.11.1'
groups: [grp_tester] groups: [grp_tester]
# docker config
docker_host: 'tcp://molecule-docker.local:2375' docker_host: 'tcp://molecule-docker.local:2375'
purge_networks: true image: 'ansible0guy/molecule:debian-latest'
image: 'debian:11-slim'
dockerfile: 'Dockerfile_debian11_systemd.j2'
build_image: yes
tmpfs: ['/tmp', '/run', '/run/lock'] tmpfs: ['/tmp', '/run', '/run/lock']
privileged: true privileged: true
command: '/sbin/init' command: '/sbin/init'

View File

@ -0,0 +1,9 @@
---
- name: Prepare
hosts: all
gather_facts: false
tasks:
- name: APT Update
ansible.builtin.apt:
update_cache: true

View File

@ -14,7 +14,7 @@
state: absent state: absent
when: > when: >
force_removal or force_removal or
removal_prompt.user_input == 'yes' removal_prompt.user_input | bool
loop: loop:
- "/etc/apache2/sites-enabled/site_{{ name }}.conf" - "/etc/apache2/sites-enabled/site_{{ name }}.conf"
- "/etc/apache2/sites-available/site_{{ name }}.conf" - "/etc/apache2/sites-available/site_{{ name }}.conf"
@ -30,4 +30,4 @@
when: > when: >
site.mode == 'serve' and site.mode == 'serve' and
(force_removal or (force_removal or
removal_prompt.user_input == 'yes') removal_prompt.user_input | bool)