How download artifactory(.tar.gz file) from jfrog artifactory using ansible playbook in linux servers?

+1 vote
How download artifactory(.tar.gz file)  from jfrog artifactory using ansible playbook in linux servers?
Aug 10 in Ansible by anil

edited Aug 13 by Kalgi 72 views

1 answer to this question.

0 votes

Hey @Anil, download the artifactory(.tar.gz) file and save it on your local system. You can use the following playbook to install it. 

- name: Install Docker
  hosts: artifactory
  become: yes
  become_method: sudo
  tasks:
  - name: Check is artifactory folder exists
    stat:
      path: artifactory
    register: artifactory_home
  - name: Clean up docker-compose
    command: >
       docker-compose down
    args:
       chdir: ./artifactory/
    when: artifactory_home.stat.exists
  - name: Delete artifactory working-dir
    file:
       state: absent
       path: artifactory
    when: artifactory_home.stat.exists
  - name: Copy artifactory working-dir
    synchronize:
       src: ./artifactory/
       dest: artifactory
  - name: Generate a Self Signed OpenSSL certificate
    command: >
       openssl req -subj '/CN=localhost' -x509 -newkey rsa:4096 -nodes
       -keyout key.pem -out cert.pem -days 365
    args:
       chdir: ./artifactory/nginx-config/
  - name: Call docker-compose to run artifactory-stake
    command: >
       docker-compose -f docker-compose.yml up -d
    args:
       chdir: ./artifactory/
answered Aug 13 by Kamal

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer

Create directories and download files in Ansible using Ansible playbook

Hey @Yash,  you could either use file module ...READ MORE

answered Jan 24 in Ansible by Cerdin
479 views
0 votes
0 answers

how can we unarchive multiple different files using ansible-playbook? i tried this yml file its getting error

---   - hosts: all     become: yes     vars:     - path: /home/ansadmin     tasks:     - name: ...READ MORE

Aug 17 in Ansible by Rajendra
• 280 points
15 views
0 votes
2 answers

How do you stop Ansible from creating .retry files in the home directory?

[defaults] ... retry_files_enabled = True # Create them ...READ MORE

answered Apr 5 in Ansible by anonymous
660 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
124 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer