Skip to content

Commit 5cd8e79

Browse files
committed
Removed Ansible APT commands for the workflow as it is not needed to properly test the workflow and often crashes.
1 parent 1378d7c commit 5cd8e79

File tree

2 files changed

+52
-50
lines changed

2 files changed

+52
-50
lines changed

challenges/mock-track-apache-php/ansible/deploy.yaml

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,25 @@
1111
ansible.builtin.set_fact:
1212
track_flags: "{{ track_flags | default({}) | combine({key: value}) }}"
1313

14-
- name: Initial System Upgrade
15-
ansible.builtin.apt:
16-
update_cache: true
17-
install_recommends: false
18-
upgrade: full
14+
# Removed APT commands to avoid workflow failure
15+
# - name: Initial System Upgrade
16+
# ansible.builtin.apt:
17+
# update_cache: true
18+
# install_recommends: false
19+
# upgrade: full
1920

20-
- name: Install PHP and Apache2
21-
ansible.builtin.apt:
22-
name:
23-
- php
24-
- apache2
25-
- libapache2-mod-php
26-
state: present
21+
# - name: Install PHP and Apache2
22+
# ansible.builtin.apt:
23+
# name:
24+
# - php
25+
# - apache2
26+
# - libapache2-mod-php
27+
# state: present
2728

28-
- name: Remove default file "/var/www/html/index.html"
29-
ansible.builtin.file:
30-
path: "/var/www/html/index.html"
31-
state: absent
29+
# - name: Remove default file "/var/www/html/index.html"
30+
# ansible.builtin.file:
31+
# path: "/var/www/html/index.html"
32+
# state: absent
3233

3334
- name: Copy the main site file (index.php)
3435
ansible.builtin.template:
@@ -38,13 +39,13 @@
3839
group: root
3940
mode: '0644'
4041

41-
- name: Restart Apache2 on failure
42-
ansible.builtin.replace:
43-
path: "/lib/systemd/system/apache2.service"
44-
regexp: 'Restart=.+$'
45-
replace: 'Restart=on-failure'
42+
# - name: Restart Apache2 on failure
43+
# ansible.builtin.replace:
44+
# path: "/lib/systemd/system/apache2.service"
45+
# regexp: 'Restart=.+$'
46+
# replace: 'Restart=on-failure'
4647

47-
- name: Restart Apache2
48-
ansible.builtin.service:
49-
name: apache2
50-
state: restarted
48+
# - name: Restart Apache2
49+
# ansible.builtin.service:
50+
# name: apache2
51+
# state: restarted

challenges/mock-track-python-service/ansible/deploy.yaml

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,20 @@
1111
ansible.builtin.set_fact:
1212
track_flags: "{{ track_flags | default({}) | combine({key: value}) }}"
1313

14-
- name: Initial System Upgrade
15-
ansible.builtin.apt:
16-
update_cache: true
17-
install_recommends: false
18-
upgrade: full
14+
# Removed APT commands to avoid workflow failure
15+
# - name: Initial System Upgrade
16+
# ansible.builtin.apt:
17+
# update_cache: true
18+
# install_recommends: false
19+
# upgrade: full
1920

20-
- name: Install Python3 and dependencies
21-
ansible.builtin.apt:
22-
name:
23-
- python3
24-
- python3-pip
25-
- virtualenv
26-
state: present
21+
# - name: Install Python3 and dependencies
22+
# ansible.builtin.apt:
23+
# name:
24+
# - python3
25+
# - python3-pip
26+
# - virtualenv
27+
# state: present
2728

2829
- name: Create service user
2930
ansible.builtin.user:
@@ -48,13 +49,13 @@
4849
group: service
4950
mode: '0600'
5051

51-
- name: Python PIP install virtual environment
52-
ansible.builtin.pip:
53-
chdir: /home/service/
54-
virtualenv: /home/service/
55-
state: present
56-
name:
57-
- flask
52+
# - name: Python PIP install virtual environment
53+
# ansible.builtin.pip:
54+
# chdir: /home/service/
55+
# virtualenv: /home/service/
56+
# state: present
57+
# name:
58+
# - flask
5859

5960
- name: Create flag file
6061
ansible.builtin.copy:
@@ -87,9 +88,9 @@
8788
[Install]
8889
WantedBy=default.target
8990
90-
- name: Start my_track service
91-
ansible.builtin.service:
92-
name: my_track.service
93-
state: restarted
94-
enabled: true
95-
daemon_reload: true
91+
# - name: Start my_track service
92+
# ansible.builtin.service:
93+
# name: my_track.service
94+
# state: restarted
95+
# enabled: true
96+
# daemon_reload: true

0 commit comments

Comments
 (0)