Skip to content

Instantly share code, notes, and snippets.

@semifocused
Created September 28, 2015 00:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save semifocused/02bee933471e2a58a4f3 to your computer and use it in GitHub Desktop.
Save semifocused/02bee933471e2a58a4f3 to your computer and use it in GitHub Desktop.
ansible-galaxy sample usage tests and output
#############################################################
#
# rolesfile with no versions specified
# ==> uses master or latest published version on ansible-galaxy
#
$ cat rolesfile
git+git://github.com/semifocused/nucleator-core-siteconfig.git
yaegashi.blockinfile
$ ansible-galaxy install -p . -r rolesfile
[DEPRECATION WARNING]: Non yaml files for role requirements. This feature will
be removed in a future release. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
- executing: git clone git://github.com/semifocused/nucleator-core-siteconfig.git nucleator-core-siteconfig
- executing: git checkout master
- executing: git archive --prefix=nucleator-core-siteconfig/ --output=/tmp/tmpTfeMOP.tar HEAD
- extracting nucleator-core-siteconfig to ./nucleator-core-siteconfig
- nucleator-core-siteconfig was installed successfully
- downloading role 'blockinfile', owned by yaegashi
- downloading role from https://github.com/yaegashi/ansible-role-blockinfile/archive/v0.5.tar.gz
- extracting yaegashi.blockinfile to ./yaegashi.blockinfile
- yaegashi.blockinfile was installed successfully
#############################################################
#
# rolesfile with versions specified
# ==> uses specified versions
#
$ rm -rf ./yaegashi.blockinfile ./nucleator-core-siteconfig
$ cat rolesfilewithversions
git+git://github.com/semifocused/nucleator-core-siteconfig.git,master
yaegashi.blockinfile,v0.4
$ ansible-galaxy install -p . -r rolesfilewithversions[DEPRECATION WARNING]: Non yaml files for role requirements. This feature will
be removed in a future release. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
- executing: git clone git://github.com/semifocused/nucleator-core-siteconfig.git nucleator-core-siteconfig
- executing: git checkout master
- executing: git archive --prefix=nucleator-core-siteconfig/ --output=/tmp/tmpFZ9rCu.tar HEAD
- extracting nucleator-core-siteconfig to ./nucleator-core-siteconfig
- nucleator-core-siteconfig was installed successfully
- downloading role 'blockinfile', owned by yaegashi
- downloading role from https://github.com/yaegashi/ansible-role-blockinfile/archive/v0.4.tar.gz
- extracting yaegashi.blockinfile to ./yaegashi.blockinfile
- yaegashi.blockinfile was installed successfully
#############################################################
#
# rolesfile with empty versions specified
# ==> uses master or latest published version on ansible-galaxy
#
$ rm -rf ./yaegashi.blockinfile ./nucleator-core-siteconfig
$ cat rolesfilewithemptyversions
git+git://github.com/semifocused/nucleator-core-siteconfig.git,
yaegashi.blockinfile,
$ ansible-galaxy install -p . -r rolesfilewithemptyversions
[DEPRECATION WARNING]: Non yaml files for role requirements. This feature will
be removed in a future release. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
- executing: git clone git://github.com/semifocused/nucleator-core-siteconfig.git nucleator-core-siteconfig
- executing: git checkout master
- executing: git archive --prefix=nucleator-core-siteconfig/ --output=/tmp/tmp4hoPkr.tar HEAD
- extracting nucleator-core-siteconfig to ./nucleator-core-siteconfig
- nucleator-core-siteconfig was installed successfully
- downloading role 'blockinfile', owned by yaegashi
- downloading role from https://github.com/yaegashi/ansible-role-blockinfile/archive/v0.5.tar.gz
- extracting yaegashi.blockinfile to ./yaegashi.blockinfile
- yaegashi.blockinfile was installed successfully
#############################################################
#
# role_specs on cmdline args with no versions specified
# ==> uses master or latest published version on ansible-galaxy
#
$ rm -rf ./yaegashi.blockinfile ./nucleator-core-siteconfig
$ ansible-galaxy install -p . git+git://github.com/semifocused/nucleator-core-siteconfig.git yaegashi.blockinfile
- executing: git clone git://github.com/semifocused/nucleator-core-siteconfig.git nucleator-core-siteconfig
- executing: git checkout master
- executing: git archive --prefix=nucleator-core-siteconfig/ --output=/tmp/tmpT3wMHp.tar HEAD
- extracting nucleator-core-siteconfig to ./nucleator-core-siteconfig
- nucleator-core-siteconfig was installed successfully
- downloading role 'blockinfile', owned by yaegashi
- downloading role from https://github.com/yaegashi/ansible-role-blockinfile/archive/v0.5.tar.gz
- extracting yaegashi.blockinfile to ./yaegashi.blockinfile
- yaegashi.blockinfile was installed successfully
#############################################################
#
# role_specs on cmdline args with versions specified
# ==> uses specified versions
#
$ rm -rf ./yaegashi.blockinfile ./nucleator-core-siteconfig
$ ansible-galaxy install -p . git+git://github.com/semifocused/nucleator-core-siteconfig.git,master yaegashi.blockinfile,v0.4
- executing: git clone git://github.com/semifocused/nucleator-core-siteconfig.git nucleator-core-siteconfig
- executing: git checkout master
- executing: git archive --prefix=nucleator-core-siteconfig/ --output=/tmp/tmpYpetrR.tar HEAD
- extracting nucleator-core-siteconfig to ./nucleator-core-siteconfig
- nucleator-core-siteconfig was installed successfully
- downloading role 'blockinfile', owned by yaegashi
- downloading role from https://github.com/yaegashi/ansible-role-blockinfile/archive/v0.4.tar.gz
- extracting yaegashi.blockinfile to ./yaegashi.blockinfile
- yaegashi.blockinfile was installed successfully
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment