Giter Club home page Giter Club logo

ansible-collection-vultr's People

Contributors

alexander-gridnev avatar dependabot[bot] avatar lalvarezguillen avatar resmo avatar samy-mahmoudi avatar sbaerlocher avatar sjreese avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ansible-collection-vultr's Issues

Sanity tests failing in ngine_io.vultr

SUMMARY

We are running sanity tests across every collection included in the Ansible community package (as part of this issue) and found that ansible-test sanity --docker against ngine_io.vultr 1.1.1 fails with ansible-core 2.13.0rc1 in ansible 6.0.0a2.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

n/a

ANSIBLE VERSION
ansible [core 2.13.0rc1]
COLLECTION VERSION
1.1.1
STEPS TO REPRODUCE
ansible-test sanity --docker
EXPECTED RESULTS

Tests are either passing or ignored.

ACTUAL RESULTS
ERROR: Found 2 validate-modules issue(s) which need to be resolved:
ERROR: plugins/inventory/vultr.py:0:0: invalid-documentation: DOCUMENTATION.plugin_type: extra keys not allowed @ data['plugin_type']. Got 'inventory'
ERROR: plugins/modules/vultr_dns_domain.py:0:0: invalid-documentation-markup: DOCUMENTATION.options.server_ip.description: Directive "M(vultr_dns_record)" must contain a FQCN for dictionary value @ data['options']['server_ip']['description']. Got ['The default server IP.', 'Use M(vultr_dns_record) to change it once the domain is created.', 'Required if C(state=present).']
ERROR: The 1 sanity test(s) listed below (out of 43) failed. See error output above for details.
validate-modules
ERROR: Command "podman exec ansible-test-controller-nbyflpbE /usr/bin/env ANSIBLE_TEST_CONTENT_ROOT=/root/ansible_collections/ngine_io/vultr LC_ALL=en_US.UTF-8 /usr/bin/python3.10 /root/ansible/bin/ansible-test sanity --containers '{}' --skip-test pylint --metadata tests/output/.tmp/metadata-x3px4yy0.json --truncate 0 --color no --host-path tests/output/.tmp/host-3qktk3un" returned exit status 1.

Providing private network when creating a VM

Unable to create a VM attached to an existing private network.

Example playbook:

      - name: Create provider routers in the Cloud
        ngine_io.vultr.vultr_server:
          api_account: default
          api_retries: 1
          name: "{{ item }}"
          snapshot: Mikrotik
          plan: 1024 MB RAM,25 GB SSD,1.00 TB BW
          region: Singapore
          private_network_enabled: yes
          state: present
          force: yes

This throws error from the API asking for network ID:

TASK [Create provider routers in the Cloud] ********************************************************************************************************************************************************************
failed: [localhost] (item=R1) => {"ansible_loop_var": "item", "changed": true, "item": "R1", "msg": "Reached API retries limit 1 for URL https://api.vultr.com/v1/server/create, method POST with data DCID=40&VPSPLANID=201&OSID=164&SNAPSHOTID=dc3605907389d&label=R1&SSHKEYID=&enable_private_network=yes&notify_activate=no. Returned 412, with body: HTTP Error 412: Request Failed b'Server add failed: No NETWORKID defined, but multiple private networks exist in this location.'", "vultr_api": {"api_account": "default", "api_endpoint": "https://api.vultr.com", "api_retries": 1, "api_retry_max_delay": 12, "api_timeout": 60}, "vultr_server": {}}

And there seems no way to specify network ID(s) when creating VM.

Inclusion of ngine_io.vultr in Ansible 2.10

This collection will be included in Ansible 2.10 because it contains modules and/or plugins that were included in Ansible 2.9. Please review:

DEADLINE: 2020-08-18

The latest version of the collection available on August 18 will be included in Ansible 2.10.0, except possibly newer versions which differ only in the patch level. (For details, see the roadmap). Please release version 1.0.0 of your collection by this date! If 1.0.0 does not exist, the same 0.x.y version will be used in all of Ansible 2.10 without updates, and your 1.x.y release will not be included until Ansible 2.11 (unless you request an exception at a community working group meeting and go through a demanding manual process to vouch for backwards compatibility . . . you want to avoid this!).

Follow semantic versioning rules

Your collection versioning must follow all semver rules. This means:

  • Patch level releases can only contain bugfixes;
  • Minor releases can contain new features, new modules and plugins, and bugfixes, but must not break backwards compatibility;
  • Major releases can break backwards compatibility.

Changelogs and Porting Guide

Your collection should provide data for the Ansible 2.10 changelog and porting guide. The changelog and porting guide are automatically generated from ansible-base, and from the changelogs of the included collections. All changes from the breaking_changes, major_changes, removed_features and deprecated_features sections will appear in both the changelog and the porting guide. You have two options for providing changelog fragments to include:

  1. If possible, use the antsibull-changelog tool, which uses the same changelog fragment as the ansible/ansible repository (see the documentation).
  2. If you cannot use antsibull-changelog, you can provide the changelog in a machine-readable format as changelogs/changelog.yaml inside your collection (see the documentation of changelogs/changelog.yaml format).

If you cannot contribute to the integrated Ansible changelog using one of these methods, please provide a link to your collection's changelog by creating an issue in https://github.com/ansible-community/ansible-build-data/. If you do not provide changelogs/changelog.yml or a link, users will not be able to find out what changed in your collection from the Ansible changelog and porting guide.

Make sure your collection passes the sanity tests

Run ansible-test sanity --docker -v in the collection with the latest ansible-base or stable-2.10 ansible/ansible checkout.

Keep informed

Be sure you're subscribed to:

Questions and Feedback

If you have questions or want to provide feedback, please see the Feedback section in the collection requirements.

(Internal link to keep track of issues: ansible-collections/overview#102)

Create Server Fails - UnicodeEncodeError: 'ascii' codec can't encode character u'\\xe3' in position 1: ordinal not in range(128)\n

Not sure if this is due to the API change, but my Ansible Runs are failing with the following output, the only change in my playbook is around the plan definition, this has now changed on the Vultr API to "vc2-2c-4gb"

ESTABLISH LOCAL CONNECTION FOR USER: root
EXEC /bin/sh -c 'echo ~root && sleep 0'
EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /root/.ansible/tmp"&& mkdir "echo /root/.ansible/tmp/ansible-tmp-1654631972.6608722-30354-211416328878133" && echo ansible-tmp-1654631972.6608722-30354-211416328878133="echo /root/.ansible/tmp/ansible-tmp-1654631972.6608722-30354-211416328878133" ) && sleep 0'
redirecting (type: modules) ansible.builtin.vultr_server to ngine_io.vultr.vultr_server
Using module file /root/.local/lib/python3.6/site-packages/ansible_collections/ngine_io/vultr/plugins/modules/vultr_server.py
PUT /root/.ansible/tmp/ansible-local-30249c_wa2x6q/tmpy541dbze TO /root/.ansible/tmp/ansible-tmp-1654631972.6608722-30354-211416328878133/AnsiballZ_vultr_server.py
EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1654631972.6608722-30354-211416328878133/ /root/.ansible/tmp/ansible-tmp-1654631972.6608722-30354-211416328878133/AnsiballZ_vultr_server.py && sleep 0'
EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1654631972.6608722-30354-211416328878133/AnsiballZ_vultr_server.py && sleep 0'
EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1654631972.6608722-30354-211416328878133/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/root/.ansible/tmp/ansible-tmp-1654631972.6608722-30354-211416328878133/AnsiballZ_vultr_server.py", line 100, in
_ansiballz_main()
File "/root/.ansible/tmp/ansible-tmp-1654631972.6608722-30354-211416328878133/AnsiballZ_vultr_server.py", line 92, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/root/.ansible/tmp/ansible-tmp-1654631972.6608722-30354-211416328878133/AnsiballZ_vultr_server.py", line 41, in invoke_module
run_name='main', alter_sys=True)
File "/usr/lib64/python2.7/runpy.py", line 176, in run_module
fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 82, in _run_module_code
mod_name, mod_fname, mod_loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/tmp/ansible_vultr_server_payload_hLoMA8/ansible_vultr_server_payload.zip/ansible_collections/ngine_io/vultr/plugins/modules/vultr_server.py", line 933, in
File "/tmp/ansible_vultr_server_payload_hLoMA8/ansible_vultr_server_payload.zip/ansible_collections/ngine_io/vultr/plugins/modules/vultr_server.py", line 926, in main
File "/tmp/ansible_vultr_server_payload_hLoMA8/ansible_vultr_server_payload.zip/ansible_collections/ngine_io/vultr/plugins/modules/vultr_server.py", line 508, in present_server
File "/tmp/ansible_vultr_server_payload_hLoMA8/ansible_vultr_server_payload.zip/ansible_collections/ngine_io/vultr/plugins/modules/vultr_server.py", line 529, in _create_server
File "/tmp/ansible_vultr_server_payload_hLoMA8/ansible_vultr_server_payload.zip/ansible_collections/ngine_io/vultr/plugins/modules/vultr_server.py", line 444, in get_region
File "/tmp/ansible_vultr_server_payload_hLoMA8/ansible_vultr_server_payload.zip/ansible_collections/ngine_io/vultr/plugins/module_utils/vultr.py", line 248, in query_resource_by_key
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe3' in position 1: ordinal not in range(128)
fatal: [localhost -> localhost]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File "/root/.ansible/tmp/ansible-tmp-1654631972.6608722-30354-211416328878133/AnsiballZ_vultr_server.py", line 100, in \n _ansiballz_main()\n File "/root/.ansible/tmp/ansible-tmp-1654631972.6608722-30354-211416328878133/AnsiballZ_vultr_server.py", line 92, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/root/.ansible/tmp/ansible-tmp-1654631972.6608722-30354-211416328878133/AnsiballZ_vultr_server.py", line 41, in invoke_module\n run_name='main', alter_sys=True)\n File "/usr/lib64/python2.7/runpy.py", line 176, in run_module\n fname, loader, pkg_name)\n File "/usr/lib64/python2.7/runpy.py", line 82, in _run_module_code\n mod_name, mod_fname, mod_loader, pkg_name)\n File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code\n exec code in run_globals\n File "/tmp/ansible_vultr_server_payload_hLoMA8/ansible_vultr_server_payload.zip/ansible_collections/ngine_io/vultr/plugins/modules/vultr_server.py", line 933, in \n File "/tmp/ansible_vultr_server_payload_hLoMA8/ansible_vultr_server_payload.zip/ansible_collections/ngine_io/vultr/plugins/modules/vultr_server.py", line 926, in main\n File "/tmp/ansible_vultr_server_payload_hLoMA8/ansible_vultr_server_payload.zip/ansible_collections/ngine_io/vultr/plugins/modules/vultr_server.py", line 508, in present_server\n File "/tmp/ansible_vultr_server_payload_hLoMA8/ansible_vultr_server_payload.zip/ansible_collections/ngine_io/vultr/plugins/modules/vultr_server.py", line 529, in _create_server\n File "/tmp/ansible_vultr_server_payload_hLoMA8/ansible_vultr_server_payload.zip/ansible_collections/ngine_io/vultr/plugins/modules/vultr_server.py", line 444, in get_region\n File "/tmp/ansible_vultr_server_payload_hLoMA8/ansible_vultr_server_payload.zip/ansible_collections/ngine_io/vultr/plugins/module_utils/vultr.py", line 248, in query_resource_by_key\nUnicodeEncodeError: 'ascii' codec can't encode character u'\xe3' in position 1: ordinal not in range(128)\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}

API name=A, hostname=B, but inventory provides only hostname=A and hostname_short=A

When I create a new instance, providing the name: "A" and hostname: "B" and then use the dynamic inventory script, I get and inventory_hostname_short: "A" and inventory_hostname: "A". Wouldn't it make more sense to provide inventory_hostname_short: "A" and inventory_hostname: "B", potentially with a config option, so it doesn't break previous playbooks? Or at least some other way to access B (it's not in the hostvars)?

Important information for collection maintainers

SUMMARY

Dear maintainers,

This is important for your collections!

  • In accordance with the Community decision, we have created the news-for-maintainers repository for announcements of changes impacting collection maintainers (see the examples) instead of Issue 45 that will be closed soon.

    • To keep yourself well-informed and, therefore, things in your collection working, please subscribe to the repository by using the Watch button in the upper right corner on the repository's home page.
    • If you do not want to get notifications about related discussions, please subscribe only to Issues.
    • Please read the brief guidelines on how the repository should be used.
    • Please avoid unnecessary discussions in issues, use the Discussions feature. Every comment posted will notify a lot of folks!
  • Also we would like to remind you about the Bullhorn contributor newsletter which has recently started to be released weekly. To learn what it looks like, see the past releases. Please subscribe and talk to the Community via Bullhorn!

  • Join us in #ansible-social (for news reporting & chat), #ansible-community (for discussing collection & maintainer topics), and other channels on Matrix/IRC.

  • Help the Community and the Steering Committee to make right decisions by taking part in discussing and voting on the Community Topics that impact the whole project and the collections in particular. Your opinion there will be much appreciated!

Thank you!

Consider using true/false for all booleans in docs

Based on the community decision to use true/false for boolean values in documentation and examples, we ask that you evaluate booleans in this collection and consider changing any that do not use true/false (lowercase).

See documentation block format for more info (specifically, option defaults).

If you have already implemented this or decide not to, feel free to close this issue.


P.S. This is auto-generated issue, please raise any concerns here

Resizing, attaching and detaching volumes

Hi @resmo. Great job on this project! Sorely needed! Specially considering how bad Vultr's v1 API is.

I noticed that the project doesn't provide the ability to resize volumes, or attach/detach them from servers. I've implemented those features (and integration tests for them) in the following MR: #14

I ran the integration tests for the new features against my Vultr account, and they work without issues.

Let me know what you think. All feedback welcome.

/v1/server/create API should be userdata, not user_data

The vultr API lists the parameter for user-data as 'userdata', not 'user_data'. Changes /plubins/modules/vultr_server.py to use the correct parameter name. Interestingly, the set_user_data API call already used the correct name.

Important information for collection maintainers

SUMMARY

Dear maintainers,

This is important for your collections!

  • In accordance with the Community decision, we have created the news-for-maintainers repository for announcements of changes impacting collection maintainers (see the examples) instead of Issue 45 that will be closed soon.

    • To keep yourself well-informed and, therefore, things in your collection working, please subscribe to the repository by using the Watch button in the upper right corner on the repository's home page.
    • If you do not want to get notifications about related discussions, please subscribe only to Issues.
    • Please read the brief guidelines on how the repository should be used.
    • Please avoid unnecessary discussions in issues, use the Discussions feature. Every comment posted will notify a lot of folks!
  • Also we would like to remind you about the Bullhorn contributor newsletter which has recently started to be released weekly. To learn what it looks like, see the past releases. Please subscribe and talk to the Community via Bullhorn!

  • Join us in #ansible-social (for news reporting & chat), #ansible-community (for discussing collection & maintainer topics), and other channels on Matrix/IRC.

  • Help the Community and the Steering Committee to make right decisions by taking part in discussing and voting on the Community Topics that impact the whole project and the collections in particular. Your opinion there will be much appreciated!

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.