[英]ansible playbook fails sometimes but not always to install jre on aws ubuntu 20.04
[英]Install ngnix on ubuntu 20.04 using ansible playbook?
嗨,我是 ansible 的新手,我必須將最新的 nodejs12.8.4、SSL 和 ngnix 部署到 Ubuntu 20.04 服務器,有人可以指導我如何做,謝謝。
這是我的 yml 文件:
hosts: all
become: true
tasks:
- name: install nodejs prerequisites
apt:
name:
- apt-transport-https
- gcc
- g++
- make
state: present
- name: add nodejs apt key
apt_key:
url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
state: present
- name: add nodejs repository
apt_repository:
repo: deb https://deb.nodesource.com/node_12.x {{ ansible_lsb.codename }} main
state: present
update_cache: yes
- name: install nodejs
apt:
name: nodejs
state: present
它現在安裝 nodejs 12 我想在同一個文件中安裝 nginx 我如何添加新任務。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.