Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
escape ansible shell commands
Browse files Browse the repository at this point in the history
  • Loading branch information
hexadecimalDinosaur committed Dec 3, 2023
1 parent 89e4ab8 commit 6ccebbb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions ansible/nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@
- debian-archive-keyring
state: present
- name: Get NGINX keyring
ansible.builtin.shell: curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
ansible.builtin.shell: >
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
- name: Install NGINX repository
ansible.builtin.shell: echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
ansible.builtin.shell: >
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
- name: Setup Repository pinning
ansible.builtin.shell: echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | sudo tee /etc/apt/preferences.d/99nginx
ansible.builtin.shell: >
echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | sudo tee /etc/apt/preferences.d/99nginx
- name: Install nginx
ansible.builtin.package:
name:
Expand Down
9 changes: 6 additions & 3 deletions deploy_bundle/nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@
- debian-archive-keyring
state: present
- name: Get NGINX keyring
ansible.builtin.shell: curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
ansible.builtin.shell: >
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
- name: Install NGINX repository
ansible.builtin.shell: echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
ansible.builtin.shell: >
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
- name: Setup Repository pinning
ansible.builtin.shell: echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | sudo tee /etc/apt/preferences.d/99nginx
ansible.builtin.shell: >
echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | sudo tee /etc/apt/preferences.d/99nginx
- name: Install nginx
ansible.builtin.package:
name:
Expand Down

0 comments on commit 6ccebbb

Please sign in to comment.