Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.