Skip to content

Instantly share code, notes, and snippets.

@avtar
Created November 12, 2015 23:11
Show Gist options
  • Select an option

  • Save avtar/ad054db62e1b0f170179 to your computer and use it in GitHub Desktop.

Select an option

Save avtar/ad054db62e1b0f170179 to your computer and use it in GitHub Desktop.
---
- hosts: localhost
user: root
tasks:
- name: Install nginx
dnf:
name: nginx
state: latest
@avtar
Copy link
Author

avtar commented Nov 12, 2015

[vagrant@ansible-test ~]$ sudo ansible-playbook install_nginx.yml 

PLAY [localhost] ************************************************************** 

GATHERING FACTS *************************************************************** 
ok: [localhost]

TASK: [Install nginx] ********************************************************* 
ok: [localhost]

PLAY RECAP ******************************************************************** 
localhost                  : ok=2    changed=0    unreachable=0    failed=0   

[vagrant@ansible-test ~]$ rpm -qa | grep nginx
[vagrant@ansible-test ~]$ 

[vagrant@ansible-test ~]$ ansible --version
ansible 1.9.4
  configured module search path = None

[vagrant@ansible-test ~]$ lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.
1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch                                                          
Distributor ID: Fedora
Description:    Fedora release 22 (Twenty Two)
Release:        22
Codename:       TwentyTwo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment