Commenting deployer tasks

This commit is contained in:
Christer Warén
2025-07-24 13:58:37 +03:00
parent 81f3b07785
commit 36009ecb5b

View File

@@ -1,56 +1,56 @@
--- ---
- name: "Deployer - Nginx - Configure - Create Folder" # - name: "Deployer - Nginx - Configure - Create Folder"
ansible.builtin.file: # ansible.builtin.file:
path: "~/data/nginx/" # path: "~/data/nginx/"
state: directory # state: directory
tags: # tags:
- nginx # - nginx
- name: "Deployer - Nginx - Configure - Create Subfolders" # - name: "Deployer - Nginx - Configure - Create Subfolders"
ansible.builtin.file: # ansible.builtin.file:
dest: '~/data/nginx/{{ item.path }}' # dest: '~/data/nginx/{{ item.path }}'
state: directory # state: directory
with_filetree: './files/nginx/' # with_filetree: './files/nginx/'
loop_control: # loop_control:
label: "{{ item.path }}" # label: "{{ item.path }}"
when: # when:
- item.state == 'directory' # - item.state == 'directory'
tags: # tags:
- nginx # - nginx
- name: "Deployer - Nginx - Configure - Generating & Transferring Files" # - name: "Deployer - Nginx - Configure - Generating & Transferring Files"
ansible.builtin.template: # ansible.builtin.template:
src: '{{ item.src }}' # src: '{{ item.src }}'
dest: '~/data/nginx/{{ item.path }}' # dest: '~/data/nginx/{{ item.path }}'
with_filetree: './files/nginx/' # with_filetree: './files/nginx/'
loop_control: # loop_control:
label: "{{ item.path }}" # label: "{{ item.path }}"
when: # when:
- item.state == 'file' # - item.state == 'file'
tags: # tags:
- nginx # - nginx
- name: "Deployer - Nginx - Pull Image" # - name: "Deployer - Nginx - Pull Image"
containers.podman.podman_image: # containers.podman.podman_image:
name: docker.io/library/nginx # name: docker.io/library/nginx
tag: latest # tag: latest
force: true # force: true
register: deployerTask3 # register: deployerTask3
- name: "Deployer - Nginx - Run Container" # - name: "Deployer - Nginx - Run Container"
containers.podman.podman_container: # containers.podman.podman_container:
name: nginx # name: nginx
image: docker.io/library/nginx:latest # image: docker.io/library/nginx:latest
state: started # state: started
recreate: on # recreate: on
network: host # network: host
volumes: # volumes:
- "{{ ansible_facts.user_dir }}/data/nginx/index.html:/usr/share/nginx/html/index.html:ro" # - "{{ ansible_facts.user_dir }}/data/nginx/index.html:/usr/share/nginx/html/index.html:ro"
- "{{ ansible_facts.user_dir }}/data/nginx/config.conf:/etc/nginx/nginx.conf:ro" # - "{{ ansible_facts.user_dir }}/data/nginx/config.conf:/etc/nginx/nginx.conf:ro"
- "{{ ansible_facts.user_dir }}/data/nginx/conf/:/etc/nginx/conf.d/:ro" # - "{{ ansible_facts.user_dir }}/data/nginx/conf/:/etc/nginx/conf.d/:ro"
- "{{ ansible_facts.user_dir }}/data/certs/:/etc/nginx/certs/:ro" # - "{{ ansible_facts.user_dir }}/data/certs/:/etc/nginx/certs/:ro"
restart_policy: always # restart_policy: always
when: # when:
- (deployerTask3 is defined and deployerTask3.changed) or deployerTask3 is undefined # - (deployerTask3 is defined and deployerTask3.changed) or deployerTask3 is undefined
tags: # tags:
- nginx # - nginx