Change curl method add executable permission
This commit is contained in:
parent
bef29c551d
commit
a9e1a43b80
@ -9,15 +9,22 @@
|
|||||||
state: directory
|
state: directory
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
|
||||||
- name: Download scripts from remote sources
|
- name: Download scripts using curl
|
||||||
get_url:
|
command: >
|
||||||
url: "{{ item.url }}"
|
curl "{{ item.url }}" -o "/tmp/downloaded_scripts/{{ item.name }}"
|
||||||
dest: "/tmp/downloaded_scripts/{{ item.name }}"
|
args:
|
||||||
mode: '0755' # Make executable
|
creates: "/tmp/downloaded_scripts/{{ item.name }}"
|
||||||
loop:
|
loop:
|
||||||
- { name: 'script1.sh', url: 'https://git.nnag.me/infidel/jenkins-smo-autodeployment/raw/branch/master/test-scripts/install_k8s.sh' }
|
- { name: 'script1.sh', url: 'https://git.nnag.me/infidel/jenkins-smo-autodeployment/raw/branch/master/test-scripts/install_k8s.sh' }
|
||||||
register: downloaded_scripts
|
register: downloaded_scripts
|
||||||
|
|
||||||
|
- name: Make downloaded scripts executable
|
||||||
|
file:
|
||||||
|
path: "/tmp/downloaded_scripts/{{ item.name }}"
|
||||||
|
mode: '0755'
|
||||||
|
loop:
|
||||||
|
- { name: 'script1.sh' }
|
||||||
|
|
||||||
- name: Execute downloaded scripts
|
- name: Execute downloaded scripts
|
||||||
shell: "/tmp/downloaded_scripts/{{ item.item.name }}"
|
shell: "/tmp/downloaded_scripts/{{ item.item.name }}"
|
||||||
loop: "{{ downloaded_scripts.results }}"
|
loop: "{{ downloaded_scripts.results }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user