Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add APB role_type to ansible-galaxy init #36789

Merged
merged 5 commits into from
Mar 9, 2018
Merged

Conversation

dymurray
Copy link
Contributor

SUMMARY

Adds apb role_type to ansible-galaxy init. This will allow Ansible-Galaxy users to initialize an APB project using the Ansible Galaxy CLI tool.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

Ansible Galaxy

ANSIBLE VERSION
ansible 2.6.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/dymurray/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible-2.6.0-py2.7.egg/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.13 (default, May 10 2017, 20:04:28) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)]

ADDITIONAL INFORMATION

Before

[dymurray@dymurray ansible]$ ansible-galaxy init -h
Usage: ansible-galaxy init [options] role_name

Options:
  --container-enabled   Initialize the skeleton role with default contents for
                        a Container Enabled role.
  -f, --force           Force overwriting an existing role
  -h, --help            show this help message and exit
  -c, --ignore-certs    Ignore SSL certificate validation errors.
  --init-path=INIT_PATH
                        The path in which the skeleton role will be created.
                        The default is the current working directory.
  --offline             Don't query the galaxy API when creating roles
  --role-skeleton=ROLE_SKELETON
                        The path to a role skeleton that the new role should
                        be based upon.
  -s API_SERVER, --server=API_SERVER
                        The API server destination
  -v, --verbose         verbose mode (-vvv for more, -vvvv to enable
                        connection debugging)
  --version             show program's version number and exit

 See 'ansible-galaxy <command> --help' for more information on a specific command.

After

[dymurray@dymurray foo-apb]$ ansible-galaxy init -h
Usage: ansible-galaxy init [options] role_name

Options:
  -f, --force           Force overwriting an existing role
  -h, --help            show this help message and exit
  -c, --ignore-certs    Ignore SSL certificate validation errors.
  --init-path=INIT_PATH
                        The path in which the skeleton role will be created.
                        The default is the current working directory.
  --offline             Don't query the galaxy API when creating roles
  --role-skeleton=ROLE_SKELETON
                        The path to a role skeleton that the new role should
                        be based upon.
  -s API_SERVER, --server=API_SERVER
                        The API server destination
  --type=ROLE_TYPE      Type of skeleton role to initiatalize. Valid options:
                        'container', 'apb'.
  -v, --verbose         verbose mode (-vvv for more, -vvvv to enable
                        connection debugging)
  --version             show program's version number and exit

 See 'ansible-galaxy <command> --help' for more information on a specific command.
[dymurray@dymurray ansible-galaxy]$ ansible-galaxy init --type apb foo-apb
- foo-apb was created successfully
[dymurray@dymurray ansible-galaxy]$ ls foo-apb/
apb.yml  defaults  Dockerfile  files  Makefile  meta  playbooks  tasks  tests  vars
[dymurray@dymurray ansible-galaxy]$ 

@ansibot ansibot added feature_pull_request needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Feb 27, 2018
@dymurray
Copy link
Contributor Author

Instead of doing ansible-galaxy init --container-enabled a user would do ansible-galaxy init --type container

@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Feb 27, 2018
@dymurray dymurray changed the title Add APB role_type to ansible-galaxy init [WIP] Add APB role_type to ansible-galaxy init Feb 28, 2018
@gundalow gundalow added galaxy and removed needs_triage Needs a first human triage before being processed. labels Feb 28, 2018
@ansibot ansibot added the WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. label Feb 28, 2018
@dymurray dymurray changed the title [WIP] Add APB role_type to ansible-galaxy init Add APB role_type to ansible-galaxy init Feb 28, 2018
@ansibot ansibot added test This PR relates to tests. and removed WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Feb 28, 2018
self.parser.add_option('--container-enabled', dest='container_enabled', action='store_true', default=False,
help='Initialize the skeleton role with default contents for a Container Enabled role.')
self.parser.add_option('--type', dest='role_type', action='store', default='default',
help="Type of skeleton role to initiatalize. Valid options: 'container', 'apb'.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/initiatalize/initialize/

APB Variables
--------------

A description of the settable variables for this APB should go here, including any variables that are in defaults/main.yml, vars/main.yml, apb.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/ie./i.e.,/

@chouseknecht
Copy link
Contributor

shipit

@chouseknecht chouseknecht self-requested a review March 1, 2018 13:53
@ansibot ansibot added feature This issue/PR relates to a feature request. and removed feature_pull_request labels Mar 1, 2018
@chouseknecht chouseknecht merged commit 90943a3 into ansible:devel Mar 9, 2018
@ansible ansible locked and limited conversation to collaborators Apr 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature This issue/PR relates to a feature request. galaxy new_contributor This PR is the first contribution by a new community member. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants