Last active
August 30, 2025 10:09
-
-
Save anujdevopslearn/c77d7025e47c5296df852998877713cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - hosts: webservers | |
| tasks: | |
| - name: Run the equivalent of "apt-get update" as a separate step | |
| apt: | |
| update_cache: yes | |
| - name: Install NodeJS package | |
| apt: name={{ item }} state=latest | |
| loop: | |
| - nodejs | |
| - unzip | |
| - npm | |
| - name: Copy NodeJS code on Application servers | |
| get_url: url=https://github.com/anujdevopslearn/SonarQubeNodeJS/archive/refs/heads/master.zip dest=/tmp/artifact.zip | |
| - name: Extract Code | |
| unarchive: src=/tmp/artifact.zip dest=/opt/ remote_src=True | |
| - name: Run Node Install | |
| shell: | | |
| npm install | |
| npm install forever -g | |
| forever start app/server.js | |
| forever list | |
| args: | |
| chdir: /opt/SonarQubeNodeJS-master |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
public