Skip to content

Instantly share code, notes, and snippets.

@roschacker
Last active April 19, 2017 15:13
Show Gist options
  • Save roschacker/7f7082e5138fc386dd474671961a3d54 to your computer and use it in GitHub Desktop.
Save roschacker/7f7082e5138fc386dd474671961a3d54 to your computer and use it in GitHub Desktop.
install stable nginx on debian or ubuntu
sudo ansible all -i 'localhost,' -c local -m apt_repository -a "repo=ppa:nginx/stable"
sudo ansible all -i 'localhost,' -c local -m apt -a "pkg=nginx state=present"
@roschacker
Copy link
Author

$ sudo ansible all -i 'localhost,' -c local -m apt_repository -a "repo=ppa:nginx/stable"
localhost | SUCCESS => {
    "changed": true,
    "repo": "ppa:nginx/stable",
    "state": "present"

$ sudo etckeeper vcs status
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   apt/sources.list
        modified:   apt/trusted.gpg

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        apt/sources.list.d/ppa_nginx_stable_trusty.list

no changes added to commit (use "git add" and/or "git commit -a")


$ sudo cat apt/sources.list.d/ppa_nginx_stable_trusty.list
cat: apt/sources.list.d/ppa_nginx_stable_trusty.list: No such file or directory
bitnami@ip-172-31-31-29:~$ sudo cat /etc/apt/sources.list.d/ppa_nginx_stable_trusty.list
deb http://ppa.launchpad.net/nginx/stable/ubuntu trusty main

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