GithubHelp home page GithubHelp logo

ansible-collections / community.general Goto Github PK

View Code? Open in Web Editor NEW
803.0 28.0 1.5K 28.49 MB

Ansible Community General Collection

Home Page: https://galaxy.ansible.com/ui/repo/published/community/general/

License: GNU General Public License v3.0

Python 99.49% Shell 0.27% DIGITAL Command Language 0.01% HCL 0.16% Jinja 0.06% C 0.01% Dockerfile 0.01% JavaScript 0.01%
ansible-collection hacktoberfest

community.general's Introduction

Community General Collection

Build Status EOL CI Codecov REUSE status

This repository contains the community.general Ansible Collection. The collection is a part of the Ansible package and includes many modules and plugins supported by Ansible community which are not part of more specialized community collections.

You can find documentation for this collection on the Ansible docs site.

Please note that this collection does not support Windows targets. Only connection plugins included in this collection might support Windows targets, and will explicitly mention that in their documentation if they do so.

Code of Conduct

We follow Ansible Code of Conduct in all our interactions within this project.

If you encounter abusive behavior violating the Ansible Code of Conduct, please refer to the policy violations section of the Code of Conduct for information on how to raise a complaint.

Communication

  • Join the Ansible forum:

    • Get Help: get help or help others. This is for questions about modules or plugins in the collection. Please add appropriate tags if you start new discussions.
    • Tag community-general: discuss the collection itself, instead of specific modules or plugins.
    • Social Spaces: gather and interact with fellow enthusiasts.
    • News & Announcements: track project-wide announcements including social events.
  • The Ansible Bullhorn newsletter: used to announce releases and important changes.

For more information about communication, see the Ansible communication guide.

Tested with Ansible

Tested with the current ansible-core 2.13, ansible-core 2.14, ansible-core 2.15, ansible-core 2.16, ansible-core 2.17 releases and the current development version of ansible-core. Ansible-core versions before 2.13.0 are not supported. This includes all ansible-base 2.10 and Ansible 2.9 releases.

External requirements

Some modules and plugins require external libraries. Please check the requirements for each plugin or module you use in the documentation to find out which requirements are needed.

Included content

Please check the included content on the Ansible Galaxy page for this collection or the documentation on the Ansible docs site.

Using this collection

This collection is shipped with the Ansible package. So if you have it installed, no more action is required.

If you have a minimal installation (only Ansible Core installed) or you want to use the latest version of the collection along with the whole Ansible package, you need to install the collection from Ansible Galaxy manually with the ansible-galaxy command-line tool:

ansible-galaxy collection install community.general

You can also include it in a requirements.yml file and install it via ansible-galaxy collection install -r requirements.yml using the format:

collections:
- name: community.general

Note that if you install the collection manually, it will not be upgraded automatically when you upgrade the Ansible package. To upgrade the collection to the latest available version, run the following command:

ansible-galaxy collection install community.general --upgrade

You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax where X.Y.Z can be any available version:

ansible-galaxy collection install community.general:==X.Y.Z

See Ansible Using collections for more details.

Contributing to this collection

The content of this collection is made by good people just like you, a community of individuals collaborating on making the world better through developing automation software.

We are actively accepting new contributors.

All types of contributions are very welcome.

You don't know how to start? Refer to our contribution guide!

The current maintainers are listed in the commit-rights.md file. If you have questions or need help, feel free to mention them in the proposals.

You can find more information in the developer guide for collections, and in the Ansible Community Guide.

Also for some notes specific to this collection see our CONTRIBUTING documentation.

Running tests

See here.

Collection maintenance

To learn how to maintain / become a maintainer of this collection, refer to:

It is necessary for maintainers of this collection to be subscribed to:

  • The collection itself (the Watch button โ†’ All Activity in the upper right corner of the repository's homepage).
  • The "Changes Impacting Collection Contributors and Maintainers" issue.

They also should be subscribed to Ansible's The Bullhorn newsletter.

Publishing New Version

See the Releasing guidelines to learn how to release this collection.

Release notes

See the changelog.

Roadmap

In general, we plan to release a major version every six months, and minor versions every two months. Major versions can contain breaking changes, while minor versions only contain new features and bugfixes.

See this issue for information on releasing, versioning, and deprecation.

More information

Licensing

This collection is primarily licensed and distributed as a whole under the GNU General Public License v3.0 or later.

See LICENSES/GPL-3.0-or-later.txt for the full text.

Parts of the collection are licensed under the BSD 2-Clause license, the MIT license, and the PSF 2.0 license.

All files have a machine readable SDPX-License-Identifier: comment denoting its respective license(s) or an equivalent entry in an accompanying .license file. Only changelog fragments (which will not be part of a release) are covered by a blanket statement in .reuse/dep5. This conforms to the REUSE specification.

community.general's People

Contributors

ajpantuso avatar akasurde avatar aminvakil avatar andersson007 avatar andytom avatar apollo13 avatar bcoca avatar billdodd avatar bluikko avatar felixfontein avatar gaetan2907 avatar gundalow avatar haddystuff avatar jikamens avatar laurpaum avatar lgatellier avatar lunik avatar mraineri avatar ptoscano avatar quidame avatar resmo avatar rosowiecki avatar russoz avatar samdoran avatar thulium-drake avatar tleguern avatar tskushal avatar undergreen avatar v1v avatar vbotka avatar

Stargazers

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

Watchers

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

community.general's Issues

manageiq_provider fails creating AWS provider on python 3 environment with serialization error

SUMMARY

mangeiq_provider fails creating an AWS provider if executed with python 3. It works without as expected on python 2. Other providers were not tested.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

manageiq_provider

ANSIBLE VERSION
2.9
CONFIGURATION

OS / ENVIRONMENT

Doesn't work on python 3 environment. Neither on AWX 10.0.0 nor on local installation in python 3 virtual environment

STEPS TO REPRODUCE
---
- hosts: localhost
  gather_facts: no
  tasks:
    - manageiq_provider:
        name: test1234
        type: Amazon
        state: present
        zone: AWS
        provider_region: eu-central-1
        provider:
          hostname: apigateway.eu-central-1.amazonaws.com
          userid: "{{ accesskey }}"
          password: "{{ secretkey }}"
        manageiq_connection:
          url: "{{ manageiqserver }}"
          username: "{{ manageiqsuser }}"
          password: "{{ manageiqpassword }}"
EXPECTED RESULTS

Successful run

ACTUAL RESULTS
fatal: [localhost]: FAILED! => {"changed": false, "msg": "failed to update provider test1234: Object of type map is not JSON serializable"}

postgresql_privs: Impossible to set column-level privileges

Copied from ansible/ansible#18955
Initially reported by @jnv

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

postgresql_privs

ANSIBLE VERSION
ansible 2.3.0.0
  config file = 
  configured module search path = Default w/o overrides
  python version = 2.7.13 (default, Jan 19 2017, 14:48:08) [GCC 6.3.0 20170118]
CONFIGURATION
OS / ENVIRONMENT

Host: Ubuntu 17.04

Target: Ubuntu 14.04, PostgreSQL 9.4

SUMMARY

It is not possible to set privileges for individual columns through the postgresql_privs, expected way to do this (i.e. privs: "SELECT(column,column)") fails. If there is an alternative solution, it is not described in documentation.

STEPS TO REPRODUCE

With PostgreSQL database mydb and table data_sources being setup, I use the following command in my playbook:

- name: Grant privileges to columns in data_sources
  postgresql_privs:
    database: mydb
    roles: mydb_reader
    privs: "SELECT(id,name,type)"
    objs: "data_sources"
EXPECTED RESULTS

Permissions to select only id, name and type columns from table data_sources is granted to the user mydb_reader.

ACTUAL RESULTS

Module fails with the following message:

Invalid privileges specified: frozenset(['TYPE)', 'NAME', 'SELECT(ID'])
NOTES

Attempt to grant privileges through postgresql_user module yields a similar result (Invalid privs specified for table: TYPE) NAME SELECT(ID), which is very similar to the equivalent MySQL's module issue ansible/ansible-modules-core#1120.

I think the solution could be to either do a smarter parsing of the privs parameter, or provide an alternative syntax for column-specific permissions, e.g. : similar to functions objects permissions.

Though I wonder why I can't just pass a list of privileges instead of comma delimeted string? This makes parsing much simpler and can be implemented in backward-compatible manner.

So far the only workaround for me is to execute psql manually.


Copied from original issue: ansible/ansible-modules-core#1529

Set certificate restrictions via mysql_user

Copied from ansible/ansible#65543
Initially reported by @robo2bobo

SUMMARY

Mariadb allows us to restrict users by their certificate, could you please add support the SUBJECT, ISSUER & CIPHER parameters?

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

mysql_user

ADDITIONAL INFORMATION

Here is an example, restricting the user by certificate subject, issuer and cipher, which is the most complex way of specifying certificate limits.

CREATE USER 'alice'@'%'
   REQUIRE SUBJECT '/CN=alice/O=My Dom, Inc./C=US/ST=Oregon/L=Portland'
   AND ISSUER '/C=FI/ST=Somewhere/L=City/ O=Some Company/CN=Peter Parker/[email protected]'
   AND CIPHER 'ECDHE-ECDSA-AES256-SHA384';

There are simple methods, for example "REQUIRE SSL" just needs the connection to be encrypted but has no restrictions on the certificate (I believe this has already been implemented in mysql_user). Another example is "REQUIRE X509" which needs the connection to be encrypted but also requires the client certificate to be valid.

Please take a look at the bottom of this page, for more details:
https://mariadb.com/kb/en/library/securing-connections-for-client-and-server/

Thank you.

postgresql_user can't detect password changes for scram-sha-256 PostgreSQL password encryption.

Copied from ansible/ansible#49878
Initially reported by @tinproject

SUMMARY

The postgresql_user module can't detect password changes for scram-sha-256 encrypted passwords, so always mark the state as changed.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

postgresql_user

ANSIBLE VERSION
ansible 2.7.4
CONFIGURATION
N/A
OS / ENVIRONMENT

All, checked with code from devel branch.

STEPS TO REPRODUCE

Use a PostgreSQL server with password_encryption = scram-sha-256 parameter on postgresql.conf.

Creates a playbook that creates an user using postgresql_user module with a clear text password using the PostgreSQL referenced before:

- name: Create user on PostgreSQL server
  postgresql_user:
    state: present
    name: "my_user"
    password: "my_secret_password"
    role_attr_flags: "LOGIN"

Run playbook multiple times.

EXPECTED RESULTS

The Create user on PostgreSQL server task will have "changed": false after the first playbook run.

ACTUAL RESULTS

The Create user on PostgreSQL server task will show as "changed": true all the times.


Integration test for htpasswd wasn't migrated

SUMMARY

The module htpasswd ansible-collections/community.general
was migrated to the communities.general collection. But the associated integration tests seems to still be in the ansible/ansible repo.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

htpasswd

add mysql options to mysql_user module

Copied from ansible/ansible#26581
Initially reported by @mohsenSy

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

mysql_user

ANSIBLE VERSION
ansible 2.4.0 (devel 2420bca0b5) last updated 2017/07/10 11:06:47 (GMT +300)
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/mohsen/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/mohsen/SourceCode/ansible/lib/ansible
  executable location = /home/mohsen/SourceCode/ansible/bin/ansible
  python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
OS / ENVIRONMENT

Ubuntu16.04 managing Ubuntu14.04

SUMMARY

When creating a new user using mysql_user module I cannot add extra options to user created such as MAX_USER_CONNECTIONS,MAX_CONNECTIONS_PER_HOUR etc...

STEPS TO REPRODUCE

This can be used to setup resource limits for new users as described in this web page: https://dev.mysql.com/doc/refman/5.7/en/user-resources.html

   mysql_user:
      name: mohsen
      password: mohsen_pass
      state: present
      options:
         - MAX_USER_CONNECTIONS: 50
EXPECTED RESULTS

A new user called mohsen should be created and it must be limited to 50 total connections

PostgreSQL db names should allow dots

Copied from original issue: ansible/ansible#66422 @raneq on 2020, 13 Jan

SUMMARY

Using postgresql database module can't contain dots, but should be able to, as escaped characters. Although it's not a good practice, it's supported by postgresql and under certain circumstances some applications force you to create databases with dots inside (like Odoo), so Ansible becomes the limiting agent here.

In #63204 I asked for this feature for users and dbs but @Andersson007 worked first on the user module and asked to create a new issue for the db module.

ISSUE TYPE

Bug Report

COMPONENT NAME

postgresql_db

ANSIBLE VERSION
ansible --version
ansible 2.8.2
  config file = None
  configured module search path = ['/home/USER/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.7/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.7.3 (default, Apr  3 2019, 05:39:12) [GCC 8.3.0]

AFAIK, the bug/feature hasn't been fixed/implemented at 2.9, so it is still relevant.

CONFIGURATION

(nothing)
OS / ENVIRONMENT
Debian 10 "Buster" running against localhost

STEPS TO REPRODUCE

Use this playbook in a Debian-like cleanable environment:

# playbook.yml
---
- hosts: localhost
  tasks:
    - name: Install PostgreSQL
      become: yes
      apt:
        name:
          - postgresql
          - python3-psycopg2
          - python2-psycopg2

    - name: PostgreSQL DB
      become: yes
      become_user: postgres
      postgresql_db:
        name: first.second

Then execute:

ansible-playbook playbook.yml --ask-become -vvv
EXPECTED RESULTS

I expected Ansible to create escaped names, as PostgreSQL supports it.

ACTUAL RESULTS
fatal: [localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "ca_cert": null,
            "conn_limit": "",
            "db": "first.second",
...
            "state": "present",
            "target": "",
            "target_opts": "",
            "template": ""
        }
    },
    "msg": "PostgreSQL does not support database with more than 1 dots"
COMMENTS

Please, don't close automatically this issue as long as there's people asking for this and there's no human saying it won't happen for some reason. Thanks!

RELATED

This issue follows the track of issues:

#63204 by @raneq
#22568 by @indreek

And these closed PR:

#22601 by @indreek
#30828 by @pilou-

And these discarded (why?) PR by @Andersson007 :

#64006
#64053
#64084
#64131

And these merged PR by @Andersson007

#64007
#63565
#63942

POTENTIALLY INTERESTED PEOPLE

People asking for a fix in the related issues and PR: @Spindel @padraiglennon @MannerMan @kmmbvnr @kyrofa @mridude23 Can you show your interest if this new issue is also meaningful to you?

Thank you everyobdy!

Maven Artifact Module Fails After Installing Python3

SUMMARY

maven_artifact fails using ansible 2.9.6 and python 3.6

ISSUE TYPE
  • Bug Report
COMPONENT NAME

maven-artifact

ANSIBLE VERSION
ansible 2.9.6
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.6.8 (default, Aug  7 2019, 17:28:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
CONFIGURATION
COLOR_CHANGED(/etc/ansible/ansible.cfg) = yellow
COLOR_DEBUG(/etc/ansible/ansible.cfg) = dark gray
COLOR_DEPRECATE(/etc/ansible/ansible.cfg) = purple
COLOR_DIFF_ADD(/etc/ansible/ansible.cfg) = green
COLOR_DIFF_LINES(/etc/ansible/ansible.cfg) = cyan
COLOR_DIFF_REMOVE(/etc/ansible/ansible.cfg) = red
COLOR_ERROR(/etc/ansible/ansible.cfg) = red
COLOR_HIGHLIGHT(/etc/ansible/ansible.cfg) = white
COLOR_OK(/etc/ansible/ansible.cfg) = green
COLOR_SKIP(/etc/ansible/ansible.cfg) = cyan
COLOR_UNREACHABLE(/etc/ansible/ansible.cfg) = red
COLOR_VERBOSE(/etc/ansible/ansible.cfg) = bright blue
COLOR_WARN(/etc/ansible/ansible.cfg) = bright purple
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
OS / ENVIRONMENT
# cat /etc/centos-release
# CentOS Linux release 7.7.1908 (Core)

# uname -a
# Linux  3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Also tried on Windows 10 Enterprise Version 1809 Build 17763.1039

STEPS TO REPRODUCE

Using maven_artifact to download required jar file from azure artifact repository

- hosts: localhost
  connection: local

  tasks:
  - name: Download extension jar
    maven_artifact:
        group_id: "{{ mfg_extensions_jar_group }}"
        artifact_id: "{{ mfg_extensions_jar_name }}"
        version: "{{ mfg_extensions_jar_version }}"
        repository_url: "{{ mfg_artifacts_url }}"
        username: "{{ mfg_artifacts_user }}"
        password: "{{ mfg_artifacts_password }}"
        verify_checksum: never
        dest: "{{ mfg_workdir.path }}/{{ mfg_app_name }}/"
    when:
        - mfg_extensions_jar_group is defined and mfg_extensions_jar_group|trim|length
        - mfg_extensions_jar_name is defined and mfg_extensions_jar_name|trim|length
        - mfg_extensions_jar_version is defined and mfg_extensions_jar_version|trim|length
EXPECTED RESULTS

Normally this would download the expected jar to later be placed into an archive

ACTUAL RESULTS
TASK [Download extension jar] **************************************************
task path: /home/***/azagent/_work/r21/a/_mfgdocker/playbooks/prepare_deploy.yml:29
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: ...
<127.0.0.1> EXEC /bin/sh -c 'echo ~... && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/***/.ansible/tmp/ansible-tmp-1585937008.9940004-57614064643061 `" && echo ansible-tmp-1585937008.9940004-57614064643061="` echo /home/***/.ansible/tmp/ansible-tmp-1585937008.9940004-57614064643061 `" ) && sleep 0'
Using module file /usr/local/lib/python3.6/site-packages/ansible/modules/packaging/language/maven_artifact.py
<127.0.0.1> PUT /home/***/.ansible/tmp/ansible-local-20567jq4z5nax/tmpg2d1fxul TO /home/***/.ansible/tmp/ansible-tmp-1585937008.9940004-57614064643061/AnsiballZ_maven_artifact.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/***/.ansible/tmp/ansible-tmp-1585937008.9940004-57614064643061/ /home/***/.ansible/tmp/ansible-tmp-1585937008.9940004-57614064643061/AnsiballZ_maven_artifact.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/bin/python3 /home/***/.ansible/tmp/ansible-tmp-1585937008.9940004-57614064643061/AnsiballZ_maven_artifact.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/***/.ansible/tmp/ansible-tmp-1585937008.9940004-57614064643061/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
  File "/tmp/ansible_maven_artifact_payload_nsowczm2/ansible_maven_artifact_payload.zip/ansible/module_utils/urls.py", line 1494, in fetch_url
    unix_socket=unix_socket, ca_path=ca_path)
  File "/tmp/ansible_maven_artifact_payload_nsowczm2/ansible_maven_artifact_payload.zip/ansible/module_utils/urls.py", line 1390, in open_url
    unredirected_headers=unredirected_headers)
  File "/tmp/ansible_maven_artifact_payload_nsowczm2/ansible_maven_artifact_payload.zip/ansible/module_utils/urls.py", line 1294, in open
    r = urllib_request.urlopen(*urlopen_args)
  File "/usr/lib64/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python3.6/urllib/request.py", line 532, in open
    response = meth(req, response)
  File "/usr/lib64/python3.6/urllib/request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib64/python3.6/urllib/request.py", line 564, in error
    result = self._call_chain(*args)
  File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib64/python3.6/urllib/request.py", line 1208, in http_error_401
    host, req, headers)
  File "/usr/lib64/python3.6/urllib/request.py", line 1092, in http_error_auth_reqed
    " the following scheme: '%s'" % scheme)
fatal: [localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "artifact_id": "amer_mfgweb_ext",
            "attributes": null,
            "backup": null,
            "classifier": "",
            "content": null,
            "delimiter": null,
            "dest": "/tmp/ansible.iezktzanwork/mfgweb/",
            "directory_mode": null,
            "extension": "jar",
            "follow": false,
            "force": null,
            "group": null,
            "group_id": "com.***",
            "headers": null,
            "http_agent": "Ansible 2.9.6 maven_artifact",
            "keep_name": false,
            "mode": null,
            "owner": null,
            "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "regexp": null,
            "remote_src": null,
            "repository_url": "https://***/***/_packaging/***/maven/v1",
            "selevel": null,
            "serole": null,
            "setype": null,
            "seuser": null,
            "src": null,
            "state": "present",
            "timeout": 10,
            "unsafe_writes": null,
            "url_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "url_username": "***",
            "username": "***",
            "validate_certs": true,
            "verify_checksum": "never",
            "version": "2020.04.2"
        }
    },
    "msg": "AbstractDigestAuthHandler does not support the following scheme: 'Bearer'",
    "status": -1,
    "url": "https://***/***/_packaging/***/maven/v1/com/***/amer_mfgweb_ext/2020.04.2/amer_mfgweb_ext-2020.04.2.jar"
}

Jira transsition issue is not working

Jira Transsition issue is not working

The Jira module is outdatred and does not use the correct Jira REST call.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

modules/web_infrastructure/jira.py
community.general/plugins/modules/web_infrastructure/jira.py

ANSIBLE VERSION
pto:ansible pto$ ansible --version
ansible 2.9.4
  config file = /Users/pto/infrastructure/ansible/ansible.cfg
  configured module search path = ['/Users/pto/infrastructure/ansible/library']
  ansible python module location = /Users/pto/Library/Python/3.8/lib/python/site-packages/ansible
  executable location = /Users/pto/Library/Python/3.8/bin/ansible
  python version = 3.8.1 (v3.8.1:1b293b6006, Dec 18 2019, 14:08:53) [Clang 6.0 (clang-600.0.57)]
pto:ansible pto$
CONFIGURATION
pto:ansible pto$ ansible-config dump --only-changed
CACHE_PLUGIN(/Users/pto/infrastructure/ansible/ansible.cfg) = jsonfile
CACHE_PLUGIN_CONNECTION(/Users/pto/infrastructure/ansible/ansible.cfg) = /tmp/facts_cache
CACHE_PLUGIN_TIMEOUT(/Users/pto/infrastructure/ansible/ansible.cfg) = 7200
DEFAULT_GATHERING(/Users/pto/infrastructure/ansible/ansible.cfg) = smart
DEFAULT_HOST_LIST(/Users/pto/infrastructure/ansible/ansible.cfg) = ['/Users/pto/infrastructure/ansible/inventory.yml']
DEFAULT_MODULE_PATH(/Users/pto/infrastructure/ansible/ansible.cfg) = ['/Users/pto/infrastructure/ansible/library']
DEFAULT_ROLES_PATH(/Users/pto/infrastructure/ansible/ansible.cfg) = ['/Users/pto/infrastructure/ansible/roles']
DEFAULT_VAULT_PASSWORD_FILE(/Users/pto/infrastructure/ansible/ansible.cfg) = /Users/pto/.vault
HOST_KEY_CHECKING(/Users/pto/infrastructure/ansible/ansible.cfg) = False
pto:ansible pto$
OS / ENVIRONMENT

Macos Catalina 10.15.4

STEPS TO REPRODUCE
# Transition an issue by target status
    - name: Change to Production
      jira:
        uri: 'https://jira.com/'
        username: '{{ jira_username }}'
        password: '{{ jira_password }}'
        project: CMDB
        issue: "ISSUE-111"
        operation: transition
        status: "Change to Production"
        validate_certs: no
      args: 
        fields:        
          comment: "Test"

This is incorrect according to latest Jira documentation: https://docs.atlassian.com/software/jira/docs/api/REST/8.5.4/#api/2/issue-doTransition

EXPECTED RESULTS

{ "update":{ "comment":[ { "add":{ "body":"Test" } } ] }, "transition":{ "id":"5" } }

ACTUAL RESULTS

This results in the REST call:
{ "fields": { "comment": "Test" }, "transition": { "id": "241" } }

kubevirt_pvc module seems to be broken

From @sbulage on Apr 16, 2020 13:36

SUMMARY

PVC is being created on the cluster, as I can see state is present in the playbook logs.

ISSUE TYPE
  • Bug Report

PVC created successfully but showing Timeout for error and overall playbook execution failed.

COMPONENT NAME

kubevirt_pvc

ANSIBLE VERSION
ansible-playbook 2.10.0.dev0
CONFIGURATION

OS / ENVIRONMENT
STEPS TO REPRODUCE
https://github.com/sbulage/ansible-kubevirt-modules/blob/master/tests/playbooks/kubevirt_pvc.yml
EXPECTED RESULTS

It should be show Timeout Error, even if PVC gets created successfully.

ACTUAL RESULTS
CreatePVCFailed: PVC creation timed out
fatal: [localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "access_modes": [
                "ReadWriteOnce"
            ],
            "annotations": {
                "kubevirt.io/provisionOnNode": "sbulage-ocp3-twvhg-worker-dz75z"
            },
            "api_key": null,
            "ca_cert": null,
            "cdi_source": null,
            "client_cert": null,
            "client_key": null,
            "context": null,
            "force": false,
            "host": null,
            "kubeconfig": null,
            "labels": null,
            "merge_type": null,
            "name": "pvc1",
            "namespace": "default",
            "password": null,
            "persist_config": null,
            "proxy": null,
            "resource_definition": null,
            "selector": null,
            "size": "100Mi",
            "state": "present",
            "storage_class_name": "hostpath-provisioner",
            "username": null,
            "validate_certs": null,
            "volume_mode": "Filesystem",
            "volume_name": null,
            "wait": true,
            "wait_timeout": 600
        }
    },
    "msg": "PVC creation timed out"
}
 
PLAY RECAP *********************************************************************
localhost                  : ok=3    changed=0    unreachable=0    failed=1    skipped=2    rescued=0    ignored=0  

Copied from original issue: ansible/ansible#68978

Thanks for destroying valuable git history

No, really. Thanks so much for taking all of that commit history and throwing it away. That helps me out so much. And thanks for telling me that my open PR needs to be resubmitted against this repo -- I would have wasted lots of time otherwise.

influxdb_database module broken with latest 5.3.0 release of influxdb_python dependency

From @jhg03a on Apr 15, 2020 22:37

SUMMARY

With the latest 5.3.0 release of influxdb_python, Ansible is no longer allowed to specify None for the udp_port.

influxdata/influxdb-python#817

ISSUE TYPE
  • Bug Report
COMPONENT NAME

influxdb_database

ANSIBLE VERSION
ansible 2.9.6
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.6/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.6.9 (default, Oct 17 2019, 11:17:29) [GCC 6.4.0]
CONFIGURATION
ANSIBLE_SSH_RETRIES(env: ANSIBLE_SSH_RETRIES) = 10
OS / ENVIRONMENT

Centos7.6

STEPS TO REPRODUCE
- name: Install Dependencies (PIP)
   pip:
     name: influxdb
     state: present

- name: Create influx database
   influxdb_database:
     database_name: foo
EXPECTED RESULTS

An influx database should be created

ACTUAL RESULTS

The task fails with a traceback error

Traceback (most recent call last):
  File "<stdin>", line 102, in <module>
  File "<stdin>", line 94, in _ansiballz_main
  File "<stdin>", line 40, in invoke_module
  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_influxdb_database_payload_lJyiY4/ansible_influxdb_database_payload.zip/ansible/modules/database/influxdb/influxdb_database.py", line 143, in <module>
  File "/tmp/ansible_influxdb_database_payload_lJyiY4/ansible_influxdb_database_payload.zip/ansible/modules/database/influxdb/influxdb_database.py", line 125, in main
  File "/tmp/ansible_influxdb_database_payload_lJyiY4/ansible_influxdb_database_payload.zip/ansible/module_utils/influxdb.py", line 85, in connect_to_influxdb
  File "/usr/lib/python2.7/site-packages/influxdb/client.py", line 118, in __init__
    self.__udp_port = int(udp_port)
TypeError: int() argument must be a string or a number, not 'NoneType'

Copied from original issue: ansible/ansible#68967

Package module pass list of packages to apt_rpm that is converted to string as is and not supported

SUMMARY

apt_rpm does not support install packages provided as list, only as comma delimited string. So package module does not work with apt_rpm

ISSUE TYPE
  • Bug Report
COMPONENT NAME

apt_rpm

ANSIBLE VERSION
ansible 2.8.8

CONFIGURATION

OS / ENVIRONMENT
STEPS TO REPRODUCE

Use simple playbook that install list of packages on Altlinux

- name: install packages
  package:
    name:
        - nginx
        - vim
EXPECTED RESULTS

Packages succesfully installed by invoking apt_rpm

ACTUAL RESULTS
TASK [install_packages : install packages] *************************************
fatal: [host-1]: FAILED! => changed=false
  msg: |-
    'apt-get -y install  'vim']' failed: E: Regex compilation error - Unmatched [ or [^

It is because:

[WARNING]: The value ['nginx', 'vim'] (type list) in a string field was converted to u"['nginx', 'librdkafka']" (type string). If this does not look like what you expect, quote the entire value to ensure it does not change.

gitlab_user: add support to block user account

SUMMARY

The gitlab_user module currently supports only two states; present and absent. The python-gitlab package has the ability to also block a user account. Deleting a user is not always desired as all projects owned by that user will be also permanently removed from GitLab too. It would be nice to add a new state of blocked where the user account is blocked instead of deleted.

Original Ansible issue: ansible/ansible#61754
Original Ansible PR: ansible/ansible#61864
Updated Ansible PR: ansible/ansible#66273

ISSUE TYPE
  • Feature Idea
COMPONENT NAME
  • gitlab_user
ADDITIONAL INFORMATION

Sample usage:

- name: Block user account
  gitlab_user:
    server_url: example.gitlab.com
    api_token:  kFCjRgwa/WriXncb7ews6A
    username: mjeco
    email: ""
    name: ""
    password: ""
    state: blocked

alicloud: About using inventory plugin

SUMMARY

I built and installed the collection locally alibaba.alicloud

Directory Structure
alibaba.alicloud

  • plugins
    • inventory
      • alicloud_ecs.py

when I tested my inventory plugin, I got infos below:

[WARNING]: Failed to load inventory plugin, skipping alicloud_ecs
[WARNING]:  * Failed to parse /Users/lixue/Desktop/project3/alibaba.alicloud/plugins/inventory/alicloud.yml with auto
plugin: inventory config '/Users/lixue/Desktop/project3/alibaba.alicloud/plugins/inventory/alicloud.yml' specifies unknown
plugin 'alicloud_ecs'

this is my alicloud.yaml

plugin: alicloud_ecs     # if write `alibaba.alicloud.alicloud_ecs`,  still can't load inventory plugin
regions:
  - cn-beijing

so, I want to known how can i use inventory plugin by collection

ANSIBLE VERSION

2.9

COMPONENT NAME

ali_instance

ISSUE TYPE
  • Bug Report

parted: ansible detects a change only in dry-run

SUMMARY

Once the partition initially created, subsequent run give:

  • "ok" without dry-run
  • "changed" with dry-run (--check)
    The only difference there is between the two runs is the following line:
    "script": "unit KiB set 1 lvm on"
ISSUE TYPE
  • Bug Report
COMPONENT NAME

parted

ANSIBLE VERSION
ansible 2.8.5
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/ansible/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible-2.8.5-py2.7.egg/ansible
  executable location = /usr/local/bin/ansible
  python version = 2.7.12 (default, Oct  8 2019, 14:14:10) [GCC 5.4.0 20160609]
CONFIGURATION

OS / ENVIRONMENT

RHEL 7.4. Using SAN storage with multipath.

STEPS TO REPRODUCE
- name: create partition
  parted:
    device: '/dev/mapper/s_server01_backup_vg.1'
    number: 1
    state: present
    flags: [ lvm ]
    part_end: '100%'
EXPECTED RESULTS

Return "ok", which is what is returned without dry-run.
Here is the output without dry-run:

ok: [server01] => (item={u'device': u'/dev/mapper/s_server01_backup_vg.1', u'part_end': u'100%', u'number': 1}) => {
    "ansible_loop_var": "item", 
    "changed": false, 
    "disk": {
        "dev": "/dev/mapper/s_server01_backup_vg.1", 
        "logical_block": 512, 
        "model": "Linux device-mapper (multipath)", 
        "physical_block": 512, 
        "size": 209715200.0, 
        "table": "msdos", 
        "unit": "kib"
    }, 
    "invocation": {
        "module_args": {
            "align": "optimal", 
            "device": "/dev/mapper/s_server01_backup_vg.1", 
            "flags": [
                "lvm"
            ], 
            "label": "msdos", 
            "name": null, 
            "number": 1, 
            "part_end": "100%", 
            "part_start": "0%", 
            "part_type": "primary", 
            "state": "present", 
            "unit": "KiB"
        }
    }, 
    "item": {
        "device": "/dev/mapper/s_server01_backup_vg.1", 
        "number": 1, 
        "part_end": "100%"
    }, 
    "partitions": [
        {
            "begin": 16384.0, 
            "end": 209715200.0, 
            "flags": [
                "lvm"
            ], 
            "fstype": "", 
            "name": "", 
            "num": 1, 
            "size": 209698816.0, 
            "unit": "kib"
        }
    ], 
    "script": ""
}
ACTUAL RESULTS

Returns "changed" only in dry-run:

changed: [server01] => (item={u'device': u'/dev/mapper/s_server01_backup_vg.1', u'part_end': u'100%', u'number': 1}) => {
    "ansible_loop_var": "item", 
    "changed": true, 
    "disk": {
        "dev": "/dev/mapper/s_server01_backup_vg.1", 
        "logical_block": 512, 
        "model": "Linux device-mapper (multipath)", 
        "physical_block": 512, 
        "size": 209715200.0, 
        "table": "msdos", 
        "unit": "kib"
    }, 
    "invocation": {
        "module_args": {
            "align": "optimal", 
            "device": "/dev/mapper/s_server01_backup_vg.1", 
            "flags": [
                "lvm"
            ], 
            "label": "msdos", 
            "name": null, 
            "number": 1, 
            "part_end": "100%", 
            "part_start": "0%", 
            "part_type": "primary", 
            "state": "present", 
            "unit": "KiB"
        }
    }, 
    "item": {
        "device": "/dev/mapper/s_server01_backup_vg.1", 
        "number": 1, 
        "part_end": "100%"
    }, 
    "partitions": [
        {
            "begin": 16384.0, 
            "end": 209715200.0, 
            "flags": [
                "lvm"
            ], 
            "fstype": "", 
            "name": "", 
            "num": 1, 
            "size": 209698816.0, 
            "unit": "kib"
        }
    ], 
    "script": "unit KiB set 1 lvm on"
}

Make module force use of GNU Make lead to issues if makefile isn't GNU Make compatible

SUMMARY

Recent change of Make module to prefere use of GNU Make lead to break compatiblity with non GNU makefile. No fallback is possible except to uninstall gmake from the system.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

make system module

ANSIBLE VERSION
ansible 2.8.5
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/needle/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.7/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.7.4 (default, Oct 11 2019, 11:15:58) [Clang 8.0.1 (tags/RELEASE_801/final)]

CONFIGURATION

OS / ENVIRONMENT

Any *BSD system with both BSD make and GNU make installed.

STEPS TO REPRODUCE

Use any BSD only Makefile. For example trying to build part of OpenBSD sources.

- make:
  target: obj
  chdir: /usr/src/usr.sbin/smtpd
EXPECTED RESULTS

Build should be successful.

ACTUAL RESULTS

Build fails because gmake was used.

Workaround

Provide a way to specify a path to the make binary to be used.

Module gitlab_runner cannot create runners

SUMMARY

I get error when using the gitlab_runner module and can't create new runners.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

gitlab_runner

ANSIBLE VERSION
ansible 2.9.6
  config file = None
  configured module search path = ['/Users/nacho/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/Cellar/ansible/2.9.6_1/libexec/lib/python3.8/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.8.2 (default, Mar 11 2020, 00:29:50) [Clang 11.0.0 (clang-1100.0.33.17)]
CONFIGURATION

It's empty

OS / ENVIRONMENT

Running the playbook from Vagrant in Mac OS X on a CentOS 8 host as target.

STEPS TO REPRODUCE

I installed python3 and the python-gitlab module on the host out of the documentation of the module requesting this and I just run the provisioning of the following playbook.yaml

---
  - hosts: all
    tasks:
    - name: "Install python"
      yum:
        name: python3
        state: latest
      become: yes
    - name: "Install dependencies"
      pip:
        name: python-gitlab
      become: yes
    - name: "Register runner"
      gitlab_runner:
        api_url: https://gitlab.com/api/v4
        api_token: <edited_an_owner_user_token>
        registration_token: <edited_a_registration_token_for_runners_from_gitlab>
        description: Test Gitlab Runner Machine t1
        state: present
        active: True
        tag_list: [ 'test']
        run_untagged: False
        locked: False

I get the following error:

The full traceback is:
Traceback (most recent call last):
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1587107312.127886-166774589825079/AnsiballZ_gitlab_runner.py", line 102, in <module>
    _ansiballz_main()
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1587107312.127886-166774589825079/AnsiballZ_gitlab_runner.py", line 94, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1587107312.127886-166774589825079/AnsiballZ_gitlab_runner.py", line 40, in invoke_module
    runpy.run_module(mod_name='ansible.modules.source_control.gitlab_runner', init_globals=None, run_name='__main__', alter_sys=True)
  File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_gitlab_runner_payload_srkquubc/ansible_gitlab_runner_payload.zip/ansible/modules/source_control/gitlab_runner.py", line 392, in <module>
  File "/tmp/ansible_gitlab_runner_payload_srkquubc/ansible_gitlab_runner_payload.zip/ansible/modules/source_control/gitlab_runner.py", line 357, in main
TypeError: __init__() got an unexpected keyword argument 'email'
fatal: [default]: FAILED! => {
    "changed": false,
    "module_stderr": "Shared connection to 127.0.0.1 closed.\r\n",
    "module_stdout": "Traceback (most recent call last):\r\n  File \"/home/vagrant/.ansible/tmp/ansible-tmp-1587107312.127886-166774589825079/AnsiballZ_gitlab_runner.py\", line 102, in <module>\r\n    _ansiballz_main()\r\n  File \"/home/vagrant/.ansible/tmp/ansible-tmp-1587107312.127886-166774589825079/AnsiballZ_gitlab_runner.py\", line 94, in _ansiballz_main\r\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n  File \"/home/vagrant/.ansible/tmp/ansible-tmp-1587107312.127886-166774589825079/AnsiballZ_gitlab_runner.py\", line 40, in invoke_module\r\n    runpy.run_module(mod_name='ansible.modules.source_control.gitlab_runner', init_globals=None, run_name='__main__', alter_sys=True)\r\n  File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\r\n    return _run_module_code(code, init_globals, run_name, mod_spec)\r\n  File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\r\n    mod_name, mod_spec, pkg_name, script_name)\r\n  File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/tmp/ansible_gitlab_runner_payload_srkquubc/ansible_gitlab_runner_payload.zip/ansible/modules/source_control/gitlab_runner.py\", line 392, in <module>\r\n  File \"/tmp/ansible_gitlab_runner_payload_srkquubc/ansible_gitlab_runner_payload.zip/ansible/modules/source_control/gitlab_runner.py\", line 357, in main\r\nTypeError: __init__() got an unexpected keyword argument 'email'\r\n",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}

Out of this issue, I tried with pyapi-gitlab module instead and got the following error:

The full traceback is:
Traceback (most recent call last):
  File "/tmp/ansible_gitlab_runner_payload_pyas03cw/ansible_gitlab_runner_payload.zip/ansible/modules/source_control/gitlab_runner.py", line 357, in main
TypeError: __init__() got an unexpected keyword argument 'url'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1587108308.389817-48103762829493/AnsiballZ_gitlab_runner.py", line 102, in <module>
    _ansiballz_main()
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1587108308.389817-48103762829493/AnsiballZ_gitlab_runner.py", line 94, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1587108308.389817-48103762829493/AnsiballZ_gitlab_runner.py", line 40, in invoke_module
    runpy.run_module(mod_name='ansible.modules.source_control.gitlab_runner', init_globals=None, run_name='__main__', alter_sys=True)
  File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_gitlab_runner_payload_pyas03cw/ansible_gitlab_runner_payload.zip/ansible/modules/source_control/gitlab_runner.py", line 392, in <module>
  File "/tmp/ansible_gitlab_runner_payload_pyas03cw/ansible_gitlab_runner_payload.zip/ansible/modules/source_control/gitlab_runner.py", line 359, in main
AttributeError: module 'gitlab.exceptions' has no attribute 'GitlabAuthenticationError'
fatal: [default]: FAILED! => {
    "changed": false,
    "module_stderr": "Shared connection to 127.0.0.1 closed.\r\n",
    "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_gitlab_runner_payload_pyas03cw/ansible_gitlab_runner_payload.zip/ansible/modules/source_control/gitlab_runner.py\", line 357, in main\r\nTypeError: __init__() got an unexpected keyword argument 'url'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/vagrant/.ansible/tmp/ansible-tmp-1587108308.389817-48103762829493/AnsiballZ_gitlab_runner.py\", line 102, in <module>\r\n    _ansiballz_main()\r\n  File \"/home/vagrant/.ansible/tmp/ansible-tmp-1587108308.389817-48103762829493/AnsiballZ_gitlab_runner.py\", line 94, in _ansiballz_main\r\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n  File \"/home/vagrant/.ansible/tmp/ansible-tmp-1587108308.389817-48103762829493/AnsiballZ_gitlab_runner.py\", line 40, in invoke_module\r\n    runpy.run_module(mod_name='ansible.modules.source_control.gitlab_runner', init_globals=None, run_name='__main__', alter_sys=True)\r\n  File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\r\n    return _run_module_code(code, init_globals, run_name, mod_spec)\r\n  File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\r\n    mod_name, mod_spec, pkg_name, script_name)\r\n  File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/tmp/ansible_gitlab_runner_payload_pyas03cw/ansible_gitlab_runner_payload.zip/ansible/modules/source_control/gitlab_runner.py\", line 392, in <module>\r\n  File \"/tmp/ansible_gitlab_runner_payload_pyas03cw/ansible_gitlab_runner_payload.zip/ansible/modules/source_control/gitlab_runner.py\", line 359, in main\r\nAttributeError: module 'gitlab.exceptions' has no attribute 'GitlabAuthenticationError'\r\n",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}
EXPECTED RESULTS

I expected that a new runner would be created in this VM and attached to the gitlab organization.

ACTUAL RESULTS

Both error conditions are show above.

New merge lists plugin from a given key

SUMMARY

Given two lists like:

list1:
  - name: myname01
    param01: myparam01
  - name: myname02
    param01: myparam02

list2:
  - name: myname01
    param01: myparam03
  - name: myname02
    param02: myparam04
  - name: myname03
    param03: myparam03

When doing:

"{{ query('mergelist', 'name', list1, list2) }}"

The results will be:

  - name: myname01
    param01: myparam03
  - name: myname02
    param01: myparam02
    param02: myparam04
  - name: myname03
    param03: myparam03
ISSUE TYPE
  • Feature Idea
COMPONENT NAME

mergelist

ADDITIONAL INFORMATION

I have already developed the solution. I really think it could be really useful in the Ansible Collections General. Please confirm.

  - name: Basic usage
    debug:
      msg: "{{ query('mergelist', 'name', list1, list2) }}"

Influxdb module has not defined default port number for udp_port parameter

SUMMARY

The default UDP port is not parsed by python when executing playbook, udp_port parameter has to be specified manually.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

Influxdb

ANSIBLE VERSION
  ansible 2.9.6
  config file = /var/production/VMs/common/ansible.cfg
  configured module search path = [u'/home/sec/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Aug  7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]

CONFIGURATION
DEFAULT_GATHERING(/var/production/VMs/common/ansible.cfg) = explicit
DEFAULT_HOST_LIST(/var/production/VMs/common/ansible.cfg) = [u'/var/production/VMs/common/hosts']
DEFAULT_ROLES_PATH(/var/production/VMs/common/ansible.cfg) = [u'/etc/ansible/roles', u'/usr/share/ansible/roles']
HOST_KEY_CHECKING(/var/production/VMs/common/ansible.cfg) = False
RETRY_FILES_ENABLED(/var/production/VMs/common/ansible.cfg) = False
OS / ENVIRONMENT

Centos 7.7.1908
Python 2.7.5

STEPS TO REPRODUCE
---
- name: Install telegraf/grafana
hosts: grafana
#gather_facts: yes

tasks:

    name: Create telegraf database
    influxdb_database:
    hostname: "{{ hostname }}"
    username: "{{ influxdb_user }}"
    password: "{{ influxdb_password }}"
    database_name: "{{ influxdb_db }}"
    udp_port: 4444 #remove to replicate
    #ssl: yes
    #validate_certs: yes

EXPECTED RESULTS

TASK [Create database using custom credentials] ***************************************************************************************************************************************************
changed: [grafana]

PLAY RECAP ****************************************************************************************************************************************************************************************
grafana : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0

ACTUAL RESULTS
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: int() argument must be a string or a number, not 'NoneType'
fatal: [grafana]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "module_stderr": "Shared connection to 10.10.0.47 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/root/.ansible/tmp/ansible-tmp-1588049203.13-261451797178880/AnsiballZ_influxdb_database.py\", line 102, in <module>\r\n    _ansiballz_main()\r\n  File \"/root/.ansible/tmp/ansible-tmp-1588049203.13-261451797178880/AnsiballZ_influxdb_database.py\", line 94, in _ansiballz_main\r\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n  File \"/root/.ansible/tmp/ansible-tmp-1588049203.13-261451797178880/AnsiballZ_influxdb_database.py\", line 40, in invoke_module\r\n    runpy.run_module(mod_name='ansible.modules.database.influxdb.influxdb_database', init_globals=None, run_name='__main__', alter_sys=True)\r\n  File \"/usr/lib64/python2.7/runpy.py\", line 176, in run_module\r\n    fname, loader, pkg_name)\r\n  File \"/usr/lib64/python2.7/runpy.py\", line 82, in _run_module_code\r\n    mod_name, mod_fname, mod_loader, pkg_name)\r\n  File \"/usr/lib64/python2.7/runpy.py\", line 72, in _run_code\r\n    exec code in run_globals\r\n  File \"/tmp/ansible_influxdb_database_payload_2u_VwQ/ansible_influxdb_database_payload.zip/ansible/modules/database/influxdb/influxdb_database.py\", line 143, in <module>\r\n  File \"/tmp/ansible_influxdb_database_payload_2u_VwQ/ansible_influxdb_database_payload.zip/ansible/modules/database/influxdb/influxdb_database.py\", line 125, in main\r\n  File \"/tmp/ansible_influxdb_database_payload_2u_VwQ/ansible_influxdb_database_payload.zip/ansible/module_utils/influxdb.py\", line 85, in connect_to_influxdb\r\n  File \"/usr/lib/python2.7/site-packages/influxdb/client.py\", line 118, in __init__\r\n    self.__udp_port = int(udp_port)\r\nTypeError: int() argument must be a string or a number, not 'NoneType'\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

cpanm modules does not install specific versions stated in playbooks

SUMMARY

We would like to manage Perl dependencies with cpanm and using Ansible cpanm module to do this. cpanm has unique version operators (documentation). We are not able to use cpanm operators in order to specify which version of package we want to download. cpanm module always downloads the latest version of package or skips it entirely.

The work PR was done 5 months ago in ansible/ansible#65196 which fixes ansible/ansible#56208. I would like to spend some time to fix this huge issue since we are patching Ansible when we need the expected module behavior.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

plugins/modules/packaging/language/cpanm.py

ANSIBLE VERSION
ansible 2.9.7
  config file = None
  configured module search path = ['/home/john/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/john/project/venv/lib/python3.7/site-packages/ansible
  executable location = /home/john/project/venv/bin/ansible
  python version = 3.7.3 (default, Dec 20 2019, 18:57:59) [GCC 8.3.0]
CONFIGURATION

Nothing has changed.

OS / ENVIRONMENT

Target host is CentOS 7.7.

EXPECTED RESULTS

cpanm should install stated version within defined versions which are stated in documentation

ACTUAL RESULTS

cpanm module skips or downloads latest version of defined package.

yarn module throws an error when running with --check flag

SUMMARY

yarn module throws ValueError: need more than 0 values to unpack when running with --check flag.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

yarn module

ANSIBLE VERSION
ansible 2.9.6
  config file = /Users/ahmed/.dotfiles/ansible.cfg
  configured module search path = ['/Users/ahmed/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/Cellar/ansible/2.9.6_1/libexec/lib/python3.8/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.8.2 (default, Mar 11 2020, 00:29:50) [Clang 11.0.0 (clang-1100.0.33.17)]
CONFIGURATION
ANSIBLE_NOCOWS(/Users/ahmed/.dotfiles/ansible.cfg) = True
DEFAULT_GATHER_SUBSET(/Users/ahmed/.dotfiles/ansible.cfg) = ['!all']
DEFAULT_MANAGED_STR(/Users/ahmed/.dotfiles/ansible.cfg) = vim: set nomodifiable : Ansible managed - DO NOT EDIT - see template source instead ({file}) or use `:set modifiable` to force.
INTERPRETER_PYTHON(/Users/ahmed/.dotfiles/ansible.cfg) = auto_silent
RETRY_FILES_SAVE_PATH(/Users/ahmed/.dotfiles/ansible.cfg) = /Users/ahmed/.ansible
OS / ENVIRONMENT

macOS 10.15.4

STEPS TO REPRODUCE

Running the example from the documentation https://docs.ansible.com/ansible/latest/modules/yarn_module.html#examples

- name: Install "imagemin" node.js package globally.
  yarn:
    name: imagemin
    global: yes

Reported on ansible/ansible#68827 by @ahmedelgabri

EXPECTED RESULTS

Return null out and err values

ACTUAL RESULTS

Error when running runpy on check mode

TASK [yarn : Install "imagemin" node.js package globally.] **************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ValueError: need more than 0 values to unpack
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"/Users/ahmed/.ansible/tmp/ansible-tmp-1586467962.020019-255476546078701/AnsiballZ_yarn.py\", line 102, in <module>\n    _ansiballz_main()\n  File \"/Users/ahmed/.ansible/tmp/ansible-tmp-1586467962.020019-255476546078701/AnsiballZ_yarn.py\", line 94, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/Users/ahmed/.ansible/tmp/ansible-tmp-1586467962.020019-255476546078701/AnsiballZ_yarn.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible.modules.packaging.language.yarn', init_globals=None, run_name='__main__', alter_sys=True)\n  File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py\", line 188, in run_module\n    fname, loader, pkg_name)\n  File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py\", line 82, in _run_module_code\n    mod_name, mod_fname, mod_loader, pkg_name)\n  File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py\", line 72, in _run_code\n    exec code in run_globals\n  File \"/var/folders/x3/_cx1vn0173b5s54dhcwmrgv80000gn/T/ansible_yarn_payload_1Yqsvo/ansible_yarn_payload.zip/ansible/modules/packaging/language/yarn.py\", line 389, in <module>\n  File \"/var/folders/x3/_cx1vn0173b5s54dhcwmrgv80000gn/T/ansible_yarn_payload_1Yqsvo/ansible_yarn_payload.zip/ansible/modules/packaging/language/yarn.py\", line 362, in main\nValueError: need more than 0 values to unpack\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

hashi_vault should report secret when an error occurs

Migrated from ansible/ansible#65734

SUMMARY

Currently, hashi_vault only reports a very basic exception when it can't access a secret. On large playbooks, where many secrets are accessed, this gives no indication which secret was failing.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

hashi_vault

ADDITIONAL INFORMATION

The error reported by hashi_vault currently looks like this:

failed: [localhost] (item=example) => {
    "changed": false, 
    "item": "example", 
    "msg": "AnsibleError: An unhandled exception occurred while running the lookup plugin 'hashi_vault'. Error was a <class 'hvac.exceptions.Forbidden'>, original message: 1 error occurred:\n\t* permission denied\n\n"
}

This should be more like:

failed: [localhost] (item=example) => {
    "changed": false, 
    "item": "example", 
    "msg": "AnsibleError: An unhandled exception occurred while running the lookup plugin 'hashi_vault'. Error was a <class 'hvac.exceptions.Forbidden'>, original message: 1 error occurred:\n\t* permission denied on secret secret=secret/example:secret\n\n"
}

Or, the hvac.exceptions.Forbidden exception should be caught by the module and handled with a proper error message.

postgresql_cluster: manage psql clusters on a host - not just main

Copied from ansible/ansible#67125
Initially reported by @DEvil0000

SUMMARY

ansible allows to manage databases and so on for postgresql but misses management of clusters.
PSQL comes with tools to manage this: pg_lsclusters, pg_createcluster and so on.
There should be a postgresql_cluster to do so.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

postgresql

ADDITIONAL INFORMATION

You could have more then one cluster with different DB versions or extensions installed. This makes sense for production and especially for migration scenarios.
PSQL comes with tools to manage this: pg_lsclusters, pg_createcluster and so on.

[cloudflare_dns] KeyError: 'success' if top level domain is blocked


name: ๐Ÿ› Bug report

SUMMARY

I have been using this cloudflare module to manage my domains at cloudflare for more than 1 year, and it worked fine. I have a free domain that ends with .tk, and for some obscure reason, 2 days ago, Cloudflare stopped allowing adding such domains through the API.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

cloudflare_dns

ANSIBLE VERSION
ansible 2.8.1
  config file = /root/ctl/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.15+ (default, Nov 27 2018, 23:36:35) [GCC 7.3.0]
CONFIGURATION
DEFAULT_CALLBACK_WHITELIST(/root/ctl/ansible.cfg) = [u'custom']
DEFAULT_HOST_LIST(/root/ctl/ansible.cfg) = [u'/root/ctl/hosts']
DEFAULT_STDOUT_CALLBACK(/root/ctl/ansible.cfg) = custom
HOST_KEY_CHECKING(/root/ctl/ansible.cfg) = False
INTERPRETER_PYTHON(/root/ctl/ansible.cfg) = /usr/bin/python3
OS / ENVIRONMENT

Docker container running inside Ubuntu 18.04

STEPS TO REPRODUCE

Use the cloudflare_dns module with a domain ending with tk.

EXPECTED RESULTS

Meaningful error.

ACTUAL RESULTS

Bad error (KeyError: 'success').

ADDITIONAL INFORMATION

When a new record is created, the module works. But when it's updated or deleted I received the error:

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: KeyError: 'success'
fatal: [localhost]: FAILED! => changed=false 
  module_stderr: |-
    Traceback (most recent call last):
      File "/root/.ansible/tmp/ansible-tmp-1587765608.59-175032794512197/AnsiballZ_cloudflare_dns.py", line 114, in <module>
        _ansiballz_main()
      File "/root/.ansible/tmp/ansible-tmp-1587765608.59-175032794512197/AnsiballZ_cloudflare_dns.py", line 106, in _ansiballz_main
        invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
      File "/root/.ansible/tmp/ansible-tmp-1587765608.59-175032794512197/AnsiballZ_cloudflare_dns.py", line 49, in invoke_module
        imp.load_module('__main__', mod, module, MOD_DESC)
      File "/usr/lib/python3.6/imp.py", line 235, in load_module
        return load_source(name, filename, file)
      File "/usr/lib/python3.6/imp.py", line 170, in load_source
        module = _exec(spec, sys.modules[name])
      File "<frozen importlib._bootstrap>", line 618, in _exec
      File "<frozen importlib._bootstrap_external>", line 678, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/tmp/ansible_cloudflare_dns_payload_7qn4_xv1/__main__.py", line 853, in <module>
      File "/tmp/ansible_cloudflare_dns_payload_7qn4_xv1/__main__.py", line 840, in main
      File "/tmp/ansible_cloudflare_dns_payload_7qn4_xv1/__main__.py", line 602, in delete_dns_records
      File "/tmp/ansible_cloudflare_dns_payload_7qn4_xv1/__main__.py", line 492, in _cf_api_call
      File "/tmp/ansible_cloudflare_dns_payload_7qn4_xv1/__main__.py", line 480, in _cf_simple_api_call
    KeyError: 'success'
  module_stdout: ''
  msg: |-
    MODULE FAILURE
    See stdout/stderr for the exact error
  rc: 1

Which tells nothing in the end, except that the following line throws an error:

when it tries to access result['success'], because in this case it's not even false, it is not defined at all.

I changed the following lines:

    if not result['success']:
        error_msg += "; Error details: "

to:

    if not result.get('success'):
        if not 'success' in result:
            error_msg += "; Error details: {0}".format(result.get('error'))
            self.module.fail_json(msg=error_msg)

        error_msg += "; Error details: "

and now I receive a much better error:

msg: 'API user does not have permission; Status: 401; Method: DELETE: Call: /zones/a8222778e37a0276468013d671b39e15/dns_records/b8051d66e565436cd6f24fbd34621f52; Error details: You cannot use this API for domains with a .cf, .ga, .gq, .ml, or .tk TLD (top-level domain). To configure the DNS settings for this domain, use the Cloudflare Dashboard.'

Unfortunately, it seems I won't be able to continue to use this domain with Cloudflare, but at least on the ansible side, the error is more meaningful.

Redhat_subscription always return changed status

SUMMARY

Since ansible Version 2.9.5 and PR #66478, redhat_subscription status is always changed even is host is already registered with RHN

ISSUE TYPE
  • Bug Report
COMPONENT NAME

redhat_subscription

ANSIBLE VERSION
ansible 2.9.7
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/tinsjourney/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.6/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.6.8 (default, Oct 11 2019, 15:04:54) [GCC 8.3.1 20190507 (Red Hat 8.3.1-4)]
CONFIGURATION
N/A
OS / ENVIRONMENT

Red Hat 8.1

STEPS TO REPRODUCE
[tinsjourney@labs ~]$ cat redhat_subscription.yaml
- name: Register Host to RHN
  hosts: all
  become: true
  vars:
    ansible_user: root

  tasks:
  - name: Register host to RHN
    redhat_subscription:
      state: present
      username: "my_username"
      password: "my_password"
      pool_ids: 0123456789abcdef0123456789abcdef
EXPECTED RESULTS
[tinsjourney@labs ~]$ ansible-playbook -i rhosp16-registry, redhat_subscription.yaml

PLAY [Register Host to RHN] ************************************************************************************************************

TASK [Gathering Facts] *****************************************************************************************************************
ok: [rhosp16-registry]

TASK [Register host to RHN] ***********************************************************************************************************
ok: [rhosp16-registry]

PLAY RECAP ****************************************************************************************************************************
rhosp16-registry           : ok=3    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
ACTUAL RESULTS
[tinsjourney@labs ~]$ ansible-playbook -i rhosp16-registry, redhat_subscription.yaml

PLAY [Register Host to RHN] ************************************************************************************************************

TASK [Gathering Facts] *****************************************************************************************************************
ok: [rhosp16-registry]

TASK [Register host to RHN] ***********************************************************************************************************
changed: [rhosp16-registry]

PLAY RECAP ****************************************************************************************************************************
rhosp16-registry           : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

gitlab_group module ignores group description on group creation

SUMMARY

The gitlab_group module ignores the description parameter for creating the group in GitLab. However, the description parameter is considered for updating the group. The module has to be executed twice in order to have the group properly created.

See the code.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

gitlab_group

ANSIBLE VERSION
ansible 2.9.6
  config file = /c/Users/142936/projects/op/dai/config/ansible.cfg
  configured module search path = ['/home/gustavomcarmo/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/gustavomcarmo/.local/lib/python3.6/site-packages/ansible
  executable location = /home/gustavomcarmo/.local/bin/ansible
  python version = 3.6.9 (default, Nov  7 2019, 10:44:02) [GCC 8.3.0]
CONFIGURATION
DEFAULT_CALLBACK_WHITELIST(/c/Users/142936/projects/op/dai/config/ansible.cfg) = ['profile_tasks']
DEFAULT_HOST_LIST(/c/Users/142936/projects/op/dai/config/ansible.cfg) = ['/c/Users/142936/projects/op/dai/config/inventory.yml']
DEFAULT_VAULT_PASSWORD_FILE(/c/Users/142936/projects/op/dai/config/ansible.cfg) = /c/Users/142936/projects/op/dai/config/vault-password-file
INVENTORY_ENABLED(/c/Users/142936/projects/op/dai/config/ansible.cfg) = ['yaml']
OS / ENVIRONMENT
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"
STEPS TO REPRODUCE
- name: "Create GitLab Group"
  gitlab_group:
    server_url: https://gitlab.example.com/
    validate_certs: True
    api_username: dj-wasabi
    api_password: "MySecretPassword"
    name: my_first_group
    path: my_first_group
    description: My First Group
    state: present
EXPECTED RESULTS

Group created with the description: "My First Group".

ACTUAL RESULTS

Group created with no description.

parted: add filesystem type parameter

SUMMARY

GNU parted allows specifying optional filesystem type, which has effect on some partition labels:
mkpart part-type [fs-type] start end
Ansible parted module should allow to specify it to override parted defaults

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

parted

ADDITIONAL INFORMATION
  parted:
    device: /dev/sdb
    number: 1
    part_end: 100%
    state: present
    filesystem: fat

terraform: Add support for multiple variables_file

SUMMARY

Add support for multiple variables_file as we can pass multiple var-files in terraform cli:
terraform apply -var-file="file-1.tfvars" -var-file="file-2.tfvars" -var-file="file-3.tfvars"

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

terraform module

ADDITIONAL INFORMATION

In many projects there are multiple variable files which are needed to be passed to terrform, but right now, the terraform module only supports a single file ( type "path"). But it could be ( type "list")

Expected usage:

- name: Terraform with multiple variables_file(s)
  terraform:
    project_path: '/home/centos/terraform'
    variables_file: 
      - "/home/terraform/overrides/file-1.tfvars"
      - "/home/terraform/overrides/file-2.tfvars"
      - "/home/terraform/overrides/somepath/file-3.tfvars"
    targets: some-target

zypper_repository tests fail reliably

SUMMARY

The zypper_repository tests currently fail reliably:

Because of that they were disabled in #96

CC @matze as module author/maintainer.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

zypper_repository

ANSIBLE VERSION
devel

osx_defaults integer type check is broken

SUMMARY

It's not possible to set negative value for using osx_defaults task.

  osx_defaults:
    domain: '{{ item.domain }}'
    key: '{{ item.key }}'
    type: '{{ item.type }}'
    value: -1
    state: present

It happens because of bad code in https://fossies.org/linux/ansible/lib/ansible/modules/system/osx_defaults.py:

       elif data_type in ["int", "integer"]:
          if not str(value).isdigit():
               raise OSXDefaultsException("Invalid integer value: {0}".format(repr(value)))
            return int(value)

related: ansible/ansible#68772

ISSUE TYPE
  • Bug Report
COMPONENT NAME

osx_default

ANSIBLE VERSION

2.10

datadog_monitor does not accept "process alert" monitor type anymore

SUMMARY

Datadog built-in module failing to deploy a "process alert" type which is a valid type of monitor.

This worked on ansible 2.6 as I referenced here: DataDog/ansible-datadog#219 (I don't know how, but I have deployed several hundred of them)

I just updated to Ansible 2.9.7 and found the issue still.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

datadog_monitor

ANSIBLE VERSION
ansible 2.9.7
  config file = None
  configured module search path = ['/Users/username/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.7/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.7.7 (default, Mar 10 2020, 15:43:27) [Clang 10.0.0 (clang-1000.11.45.5)]
CONFIGURATION

OS / ENVIRONMENT

OSX 10.13.6
Python 3.7.7

STEPS TO REPRODUCE
    - name: Deploy datadog monitor
      delegate_to: localhost
      register: datadogstatDeploy
      datadog_monitor:
        type: "process alert"
        thresholds:
          critical: 0
        name: "your alert name"
        state: "present"
        query: "your alert query"
        message: "your alert message"
        api_key: "{{ datadog.apiKey }}"
        app_key: "{{ datadog.appKey }}"
EXPECTED RESULTS

The process monitor to deploy.

ACTUAL RESULTS
FAILED! => {"changed": false, "msg": "value of type must be one of: metric alert, service check, event alert, got: process alert"}

mysql_user module of ansible not working as expected with ansible engine 2.9.6

SUMMARY

Below is the piece of code failing to create mysql user.

hosts: localhost
tasks:
add_host: hostname=abc.example.com group=remotehost
hosts: remotehost
remote_user: ansible
tasks:
name: create user and grant specific access to a DB
mysql_user:
name="username"
password="password"
host="localhost"
check_implicit_admin=yes
priv="dbname.*:ALL,GRANT"
login_user="mysql"
login_password="password"
login_host="abc.example.com"
with_items:
"10.11.12.13"
"abc"
"abc.example.com"
"%"

I am running the above script. The user mysql has full privilege to mysql. when I run the playbook with ansible engine version 2.7.9, it worked fine, but throwing error as below when run against ansible engine version 2.9.6

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: _mysql_exceptions.OperationalError: (1142, "SELECT command denied to user ''@'abc.example.com' for table 'user'")

PyMySQL version 0.9.3 is installed on my ansible control machine.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

mysql_user

ANSIBLE VERSION
2.9.6

CONFIGURATION

OS / ENVIRONMENT

7.7

STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS

osx_defaults - Add dict support

SUMMARY

Looking to do this type of command with the module:
defaults write com.apple.finder FXInfoPanesExpanded -dict
General -bool true
OpenWith -bool true
Privileges -bool true

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

osx_defaults.py

ADDITIONAL INFORMATION

Several of the defaults values are in a dictionary format

- osx_defaults:
    domain: com.apple.finder
    key: FXInfoPanesExpanded
    type: dict
    value: 
         - {Key: General, type: bool, value: true}
         - {Key: Openwith, type: bool, value: true}
         - {Key: Privileges, type: bool, value: true}
    state: present

docker_swarm invalid join token

ISSUE TYPE
  • Bug Report
SUMMARY

When joining a swarm with docker_swarm, the response is:

{"changed": false, "msg": "Can not join the Swarm Cluster: 500 Server Error: Internal Server Error ("invalid join token")"}

Someone else reported this on stackoverflow but never resolved it.

Here are the tasks. Please note that creating the swarm works. Joining gives the error..

        # THIS WORKS
        -   name: "Initialise swarm on manager node"
            when: "node_ips[manager_node] == inventory_hostname"
            register: swarm_result
            docker_swarm:
                advertise_addr: "{{ node_ips[manager_node] }}"
                state: "present"

       # THIS FAILS
        -   name: "Join swarm on worker nodes"
            when: "inventory_hostname != node_ips[manager_node]"
            docker_swarm:
                remote_addrs: "{{ node_ips[manager_node] }}"
                advertise_addr: "{{ inventory_hostname }}"
                join_token: swarm_result.swarm_facts.JoinTokens.Worker
                state: "join"
COMPONENT NAME

docker_swarm

ANSIBLE VERSION
ansible 2.9.7
OS / ENVIRONMENT
MacOS

Originally posted here: ansible/ansible#69156.

Postgresql_*, can't modify role with dot in name.

From @michalg91 on Apr 02, 2020 10:06

SUMMARY

While creating role with dot in name (eg jan.kowalski) postgres module fails with PostgreSQL does not support role with more than 1 dots.
(item={'name': 'jan.kowalski'}) => {"ansible_loop_var": "item", "changed": false, "item": {"name": "jan.kowalski"}, "msg": "PostgreSQL does not support role with more than 1 dots"}
When trying to assing group with postgresql_membership module it fails telling the user i just created doesn't exist. Modyfying user privileges also doesn't work when running next postgresql_user task.
Providing user with escaped quotes works only when user doesn't exists in database and it only allow me to create the user, next tasks are failing at PostgreSQL does not support role with more than 1 dots.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

postgresql_*

ANSIBLE VERSION
ansible 2.9.6
  python version = 3.7.6 (default, Jan 30 2020, 09:44:41) [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)]
OS / ENVIRONMENT

target os: Debian stretch
Postgresql version: 11

STEPS TO REPRODUCE
---
- postgresql_user:
      name: "sample_group"
      role_attr_flags: "NOLOGIN"

- postgresql_user:
      name: "jan.kowalski"

- postgresql_membership:
      group: "sample_group"
      target_roles: ['jan.kowalski']

- postgresql_user:
      name: "jan.kowalski"
      db: "test_db"
      priv: 'CONNECT'
EXPECTED RESULTS

Ansible should create role and assing parent role to the user, running it again should not fail, and should not try to create user again. The PostgreSQL does not support role with more than 1 dots should not come out, while it has only one error.

ACTUAL RESULTS
 (item={'name': 'jan.kowalski'}) => {"ansible_loop_var": "item", "changed": false, "item": {"name": "jan.kowalski"}, "msg": "PostgreSQL does not support role with more than 1 dots"}

Copied from original issue: ansible/ansible#68632

with_filetree examples not working

SUMMARY

Installed this collection and current Ansible devel

with_filetree loops error, and no rational variation of the plugin's example works.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

plugins/lookup/filetree.py

ANSIBLE VERSION

Bleeding edge, all the way. Rebased 11am April 2, 2020

$ ansible --version
[WARNING]: You are running the development version of Ansible. You should only run Ansible from "devel" if you are modifying the Ansible engine, or trying out features under
development. This is a rapidly changing source of code and can become unstable at any point.
ansible 2.10.0.dev0
  config file = None
  configured module search path = ['/Users/alancoding/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/alancoding/Documents/repos/ansible/lib/ansible
  executable location = /Users/alancoding/.virtualenvs/awx_collection/bin/ansible
  python version = 3.6.5 (default, Apr 25 2018, 14:23:58) [GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)]

Also, this template should ask about the collection version.

I tested with current devel of the collection and the version 0.1.1 from Galaxy.

CONFIGURATION
$ ansible-config dump --only-changed
[WARNING]: You are running the development version of Ansible. You should only run Ansible from "devel" if you are modifying the Ansible engine, or trying out features under
development. This is a rapidly changing source of code and can become unstable at any point.
ANSIBLE_NOCOWS(env: ANSIBLE_NOCOWS) = True
OS / ENVIRONMENT

Mac OS, control machine

STEPS TO REPRODUCE

This playbook works in Ansible 2.9:

---
- hosts: localhost
  gather_facts: false
  connection: local
  collections:
    - community.general
  vars:
    loc_tests: "/Users/alancoding/Documents/tower/sanity"
  tasks:
    - name: Show targets
      debug: msg="{{ loc_tests }}{{ tasks_file.path }}"
      with_filetree: "{{ loc_tests }}"
      loop_control:
        label: "{{ tasks_file.path }}"
        loop_var: tasks_file

Make your own substitutions of any valid directory fed in with_filetree: "{{ loc_tests }}".

To establish I'm not incompetent:

$ ls /Users/alancoding/Documents/tower/sanity
data			inventory.yml		new_workflow.yml	receive.yml		survey.yml		wfjt_vars.yml
integration.yml		issues			notification.yml	requirements		user.yml
inventory		lookup.yml		old			settings.yml		user_issue.yml
EXPECTED RESULTS

Running with Ansible 2.9, I know this uses the base content, and not this collection:

$ ansible-playbook sanity/issues/filetree_collection.yml 
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [localhost] ********************************************************************************************************************************************************************

TASK [Show targets] *****************************************************************************************************************************************************************
ok: [localhost] => (item=old) => {
    "msg": "/Users/alancoding/Documents/tower/sanityold"
}
ok: [localhost] => (item=requirements) => {
    "msg": "/Users/alancoding/Documents/tower/sanityrequirements"
...
<content truncated>
...
}
ok: [localhost] => (item=data/schema.json) => {
    "msg": "/Users/alancoding/Documents/tower/sanitydata/schema.json"
}
ok: [localhost] => (item=issues/filetree_collection.yml) => {
    "msg": "/Users/alancoding/Documents/tower/sanityissues/filetree_collection.yml"
}

PLAY RECAP **************************************************************************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

ACTUAL RESULTS

Running with Ansible devel:

$ ansible-playbook sanity/issues/filetree_collection.yml 
[WARNING]: You are running the development version of Ansible. You should only run Ansible from "devel" if you are modifying the Ansible engine, or trying out features under
development. This is a rapidly changing source of code and can become unstable at any point.
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
ERROR! 'with_filetree' is not a valid attribute for a Task

The error appears to be in '/Users/alancoding/Documents/tower/sanity/issues/filetree_collection.yml': line 10, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  tasks:
    - name: Show targets
      ^ here

This error can be suppressed as a warning using the "invalid_task_attribute_failed" configuration

If I use community.general.with_filetree where the playbook uses with_filetree, I get:

$ ansible-playbook sanity/issues/filetree_collection.yml 
[WARNING]: You are running the development version of Ansible. You should only run Ansible from "devel" if you are modifying the Ansible engine, or trying out features under
development. This is a rapidly changing source of code and can become unstable at any point.
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
ERROR! conflicting action statements: debug, community.general.with_filetree

The error appears to be in '/Users/alancoding/Documents/tower/sanity/issues/filetree_collection.yml': line 10, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  tasks:
    - name: Show targets
      ^ here

The plugin:

https://github.com/ansible-collections/community.general/blob/796737755bf0ea274f5bf5873af950bafbab73c5/plugins/lookup/filetree.py

gives examples like:

- name: Create directories
  file:
    path: /web/{{ item.path }}
    state: directory
    mode: '{{ item.mode }}'
  with_filetree: web/
  when: item.state == 'directory'

I've tried all the variations I can think of, I don't see how looping with these plugins can work.

maven_artifact md5 checksum is case sensitive

SUMMARY

When using the maven_artifact module to download artifacts from Azure DevOps Maven feed with the default verify_checksum option: download , the module fails with:

"msg": "Cannot retrieve the artifact to destination: Checksum does not match: we computed cd24c3cdc2d7bff332c4ccb9205af867but the repository states CD24C3CDC2D7BFF332C4CCB9205AF867"

As can be seen in the message above, the md5 hashes are exactly the same, only one is in upper case and the other in lower case. This shouldn't matter for the checksum verification so the code should do the comparison forcing either lower case or upper case for the local and the remote md5 checksums.

Moreover, there's a missing space in the error message "cd24c3cdc2d7bff332c4ccb9205af867but"

ISSUE TYPE
  • Bug Report
COMPONENT NAME

maven_artifact

ANSIBLE VERSION
ansible 2.9.2
  config file = /home/xjood/.ansible.cfg
  configured module search path = ['/home/xjood/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.6/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0]
CONFIGURATION
ANSIBLE_NOCOWS(/home/xjood/.ansible.cfg) = True
CONDITIONAL_BARE_VARS(/home/xjood/.ansible.cfg) = False
DEFAULT_CALLBACK_WHITELIST(/home/xjood/.ansible.cfg) = ['profile_tasks']
DEFAULT_FORKS(/home/xjood/.ansible.cfg) = 100
DISPLAY_SKIPPED_HOSTS(/home/xjood/.ansible.cfg) = False
RETRY_FILES_ENABLED(/home/xjood/.ansible.cfg) = False
OS / ENVIRONMENT
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
STEPS TO REPRODUCE

I'm using the module in the following way, locally:

    - name: Get artifacts
      maven_artifact:
        repository_url: "{{ repository_url }}"
        group_id: "{{ group_id }}"
        artifact_id: "{{ artifact_id }}"
        version: "{{ version }}"
        dest: /tmp/
        keep_name: yes
        headers:
          Authorization: "Basic {{ (username + ':' + password) | b64encode }}"
      vars:
        username: "{{ lookup('env', 'MAVEN_REPO_PAT') }}"
        password: "{{ lookup('env', 'MAVEN_REPO_PAT') }}"
EXPECTED RESULTS

I would expect the artifacts to be downloaded successfully.

ACTUAL RESULTS

ansible-playbook 2.9.2
  config file = /home/xjood/.ansible.cfg
  configured module search path = ['/home/xjood/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.6/dist-packages/ansible
  executable location = /usr/local/bin/ansible-playbook
  python version = 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0]
Using /home/xjood/.ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
script declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
auto declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
yaml declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
ini declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
toml declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
[WARNING]: No inventory was parsed, only implicit localhost is available

[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

Loading callback plugin default of type stdout, v2.0 from /usr/local/lib/python3.6/dist-packages/ansible/plugins/callback/default.pyLoading callback plugin profile_tasks of type aggregate, v2.0 from /usr/local/lib/python3.6/dist-packages/ansible/plugins/callback/profile_tasks.py

PLAYBOOK: _test_playbook.yml *******************************************************************************************************Positional arguments: _test_playbook.yml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/etc/ansible/hosts',)
forks: 100
1 plays in _test_playbook.yml

PLAY [TEST] ************************************************************************************************META: ran handlers
Wednesday 15 April 2020  12:56:08 +0200 (0:00:00.081)       0:00:00.081 *******
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: xjood
<127.0.0.1> EXEC /bin/sh -c 'echo ~xjood && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/xjood/.ansible/tmp/ansible-tmp-1586948169.0758207-28476717278723 `" && echo ansible-tmp-1586948169.0758207-28476717278723="` echo /home/xjood/.ansible/tmp/ansible-tmp-1586948169.0758207-28476717278723 `" ) && sleep 0'
Using module file /usr/local/lib/python3.6/dist-packages/ansible/modules/packaging/language/maven_artifact.py
<127.0.0.1> PUT /home/xjood/.ansible/tmp/ansible-local-6242catc6jti/tmpomgs2pa5 TO /home/xjood/.ansible/tmp/ansible-tmp-1586948169.0758207-28476717278723/AnsiballZ_maven_artifact.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/xjood/.ansible/tmp/ansible-tmp-1586948169.0758207-28476717278723/ /home/xjood/.ansible/tmp/ansible-tmp-1586948169.0758207-28476717278723/AnsiballZ_maven_artifact.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 /home/xjood/.ansible/tmp/ansible-tmp-1586948169.0758207-28476717278723/AnsiballZ_maven_artifact.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/xjood/.ansible/tmp/ansible-tmp-1586948169.0758207-28476717278723/ > /dev/null 2>&1 && sleep 0'

TASK [Get artifacts] ***************************************************************************************************************task path: /mnt/c/Users/.../_test_playbook.yml:46
fatal: [localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "artifact_id": "...",
            "attributes": null,
            "backup": null,
            "classifier": "",
            "content": null,
            "delimiter": null,
            "dest": "/tmp/",
            "directory_mode": null,
            "extension": "jar",
            "follow": false,
            "force": null,
            "group": null,
            "group_id": "com...",
            "headers": {
                "Authorization": "Basic <base64 encoded username:password>"
            },
            "http_agent": "Ansible 2.9.2 maven_artifact",
            "keep_name": true,
            "mode": null,
            "owner": null,
            "password": null,
            "regexp": null,
            "remote_src": null,
            "repository_url": "https://pkgs.dev.azure.com/...",
            "selevel": null,
            "serole": null,
            "setype": null,
            "seuser": null,
            "src": null,
            "state": "present",
            "timeout": 10,
            "unsafe_writes": null,
            "url_password": null,
            "url_username": null,
            "username": null,
            "validate_certs": true,
            "verify_checksum": "download",
            "version": "1.0.3"
        }
    },
    "msg": "Cannot retrieve the artifact to destination: Checksum does not match: we computed 21c1dfd2f1a3aa74e24220d1c8ac0582but the repository states 21C1DFD2F1A3AA74E24220D1C8AC0582"
}

PLAY RECAP *************************************************************************************************************************localhost                  : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

Wednesday 15 April 2020  12:56:11 +0200 (0:00:02.956)       0:00:03.037 *******
===============================================================================
Get artifacts --------------------------------------------------------------------------------------------------------------- 2.96s

postgresql_user module fails with password on version 10.x if server is fips enabled

Copied from ansible/ansible#41787
Initially reported by @jbscalia

Postgresql_user needs to support AES-256 encryption.

SUMMARY

If a server is FIPS-140-2 enabled, md5 is not permitted as an "encryption/hashing" algorithm. PostgreSQL version 10 supports AES-256 encryption, but postgresql_user does not support that option, and is unusable on a FIPS enabled server.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

postgresql_user

ANSIBLE VERSION

ansible --version
ansible 2.4.2.0
config file = /home/419635/.ansible.cfg
configured module search path = [u'/home/419635/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.5 (default, May 3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]


##### CONFIGURATION
ansible-config dump --only-changed
DEFAULT_FORKS(/home/419635/.ansible.cfg) = 2
DEFAULT_HOST_LIST(/home/419635/.ansible.cfg) = [u'/home/419635/postgres/9.6/ansible/environm
DEFAULT_LOG_PATH(/home/419635/.ansible.cfg) = /home/419635/ansible.log
DEFAULT_ROLES_PATH(/home/419635/.ansible.cfg) = [u'/etc/ansible/roles', u'/usr/share/ansible
DEFAULT_VAULT_PASSWORD_FILE(/home/419635/.ansible.cfg) = /home/419635/postgres/10/ansible/.v
PERSISTENT_CONNECT_TIMEOUT(/home/419635/.ansible.cfg) = 30

##### OS / ENVIRONMENT
Redhat Enterprise Linux 7.4, kernel 3.10.0-514.el7

##### STEPS TO REPRODUCE
create a play using the postgresql_user module as shown and attempt to run the play on a fips enabled server.

""
- name: Ensure the "{{ pg_replication_user }}" role exists in our primary
  become: yes
  become_user: "{{ postgresql_superuser }}"
  postgresql_user:
    name: "{{ pg_replication_user }}"
    password: "{{ pg_replication_user_password }}"
    encrypted: True
    port: "{{ pg_port }}"
    role_attr_flags: LOGIN,REPLICATION
EXPECTED RESULTS

Expected the user to be created in the specified PostgreSQL cluster.

ACTUAL RESULTS

The module failed.

TASK [replica : Ensure the "rplctn_usr" role exists in our primary] ************************
atal: [cl-rhdb-7025.ba.ssa.gov]: FAILED! => {"changed": false, "module_stderr": "Shared connection to cl-rhdb-7025.ba.ssa.gov closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_IsugL6/ansible_module_postgresql_user.py\", line 844, in <module>\r\n    main()\r\n  File \"/tmp/ansible_IsugL6/ansible_module_postgresql_user.py\", line 803, in main\r\n    role_attr_flags, encrypted, expires, no_password_changes, conn_limit)\r\n  File \"/tmp/ansible_IsugL6/ansible_module_postgresql_user.py\", line 338, in user_alter\r\n    pwchanging = user_should_we_change_password(current_role_attrs, user, password, encrypted)\r\n  File \"/tmp/ansible_IsugL6/ansible_module_postgresql_user.py\", line 304, in user_should_we_change_password\r\n    hashed_password = 'md5{0}'.format(md5(to_bytes(password) + to_bytes(user)).hexdigest())\r\nValueError: error:060800A3:digital envelope routines:EVP_DigestInit_ex:disabled for fips\r\n", "msg": "MODULE FAILURE", "rc": 1}

[splunk] callback plugin does not provide option to not validate certificate

SUMMARY

I activated the splunk plugin and the destination uses an https endpoint but with self-signed certificate. When launching a playbook I get the following error.

TASK [Gathering Facts] **************************************************************************************************************************************************************************
ok: [localhost]
[WARNING]: Failure using method (v2_runner_on_ok) in callback plugin (<ansible.plugins.callback.splunk.CallbackModule object at 0x7f6c3711ab10>): <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:618)>
ISSUE TYPE
  • Bug Report
COMPONENT NAME

splunk

ANSIBLE VERSION
ansible 2.9.2
  config file = /home/bmillemathias/ansible-playbook-tests/ansible.cfg
  configured module search path = [u'/home/bmillemathias/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/venv/ansible/lib/python2.7/site-packages/ansible
  executable location = /opt/venv/ansible/bin/ansible
  python version = 2.7.5 (default, Jun 11 2019, 14:33:56) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
CONFIGURATION
DEFAULT_CALLBACK_WHITELIST(/home/bmillemathias/ansible-playbook-tests/ansible.cfg) = [u'splunk']
OS / ENVIRONMENT

N/A

STEPS TO REPRODUCE
EXPECTED RESULTS

to work be able to send callback to the https with self-signed cert.

ACTUAL RESULTS
Callback Exception:
  File "/opt/venv/ansible/lib/python2.7/site-packages/ansible/executor/task_queue_manager.py", line 323, in send_callback
    method(*new_args, **kwargs)
   File "/opt/venv/ansible/lib/python2.7/site-packages/ansible/plugins/callback/splunk.py", line 194, in v2_runner_on_ok
    self._runtime(result)
   File "/opt/venv/ansible/lib/python2.7/site-packages/ansible/plugins/callback/splunk.py", line 133, in send_event
    method='POST'
   File "/opt/venv/ansible/lib/python2.7/site-packages/ansible/module_utils/urls.py", line 1390, in open_url
    unredirected_headers=unredirected_headers)
   File "/opt/venv/ansible/lib/python2.7/site-packages/ansible/module_utils/urls.py", line 1294, in open
    r = urllib_request.urlopen(*urlopen_args)
   File "/usr/lib64/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
   File "/usr/lib64/python2.7/urllib2.py", line 431, in open
    response = self._open(req, data)
   File "/usr/lib64/python2.7/urllib2.py", line 449, in _open
    '_open', req)
   File "/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
   File "/opt/venv/ansible/lib/python2.7/site-packages/ansible/module_utils/urls.py", line 448, in https_open
    req
   File "/usr/lib64/python2.7/urllib2.py", line 1214, in do_open
    raise URLError(err)

META: ran handlers

mysql_db: ProgrammingError when using quotes

Copied from ansible/ansible#47051
Initially reported by @azielke

SUMMARY

When using quoted datebase names (e.g. name contains a dot), the database is successfully created on the first ansible run, but subsequent runs return an ProgrammingError.

When not using quotes, the database is not created, because it contains a dot:

TASK [Create dummy db] ***************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: SQLParseError: MySQL does not support database with more than 1 dots
fatal: [localhost]: FAILED! => {"changed": false, "msg": "error creating database: MySQL does not support database with more than 1 dots"}
ISSUE TYPE
  • Bug Report
COMPONENT NAME

mysql_db

ANSIBLE VERSION
ansible 2.7.0
  config file = /home/azielke/ansible/ansible.cfg
  configured module search path = [u'/home/azielke/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 20160609]
CONFIGURATION
DEFAULT_BECOME(/home/azielke/ansible/ansible.cfg) = True
DEFAULT_BECOME_ASK_PASS(/home/azielke/ansible/ansible.cfg) = False
DEFAULT_BECOME_METHOD(/home/azielke/ansible/ansible.cfg) = sudo
DEFAULT_BECOME_USER(/home/azielke/ansible/ansible.cfg) = root
DEFAULT_FORKS(/home/azielke/ansible/ansible.cfg) = 10
DEFAULT_HOST_LIST(/home/azielke/ansible/ansible.cfg) = [u'/home/azielke/ansible/hosts']
DEFAULT_REMOTE_USER(/home/azielke/ansible/ansible.cfg) = azielke
DEFAULT_ROLES_PATH(/home/azielke/ansible/ansible.cfg) = [u'/home/azielke/ansible/galaxy_roles']
OS / ENVIRONMENT

OS: Ubuntu 16.04 LTS

mysql  Ver 15.1 Distrib 10.0.36-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
STEPS TO REPRODUCE
- hosts: all
  tasks:
    - name: "Create dummy db"
      mysql_db:
        name: "`dummy.tld`"

First run creates the database - 2nd run produces the error below.

EXPECTED RESULTS

task ok

ACTUAL RESULTS
TASK [Create dummy db] ***************************************************************************************************************
task path: /home/azielke/ansible/site.yml:3
<localhost> ESTABLISH SSH CONNECTION FOR USER: azielke
<localhost> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=azielke -o ConnectTimeout=10 -o ControlPath=/home/azielke/.ansible/cp/d75ede5cf8 localhost '/bin/sh -c '"'"'echo ~azielke && sleep 0'"'"''
<localhost> (0, '/home/azielke\n', '')
<localhost> ESTABLISH SSH CONNECTION FOR USER: azielke
<localhost> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=azielke -o ConnectTimeout=10 -o ControlPath=/home/azielke/.ansible/cp/d75ede5cf8 localhost '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/azielke/.ansible/tmp/ansible-tmp-1539597525.47-108280598146597 `" && echo ansible-tmp-1539597525.47-108280598146597="` echo /home/azielke/.ansible/tmp/ansible-tmp-1539597525.47-108280598146597 `" ) && sleep 0'"'"''
<localhost> (0, 'ansible-tmp-1539597525.47-108280598146597=/home/azielke/.ansible/tmp/ansible-tmp-1539597525.47-108280598146597\n', '')
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/database/mysql/mysql_db.py
<localhost> PUT /home/azielke/.ansible/tmp/ansible-local-25745avF4wJ/tmpYP1hby TO /home/azielke/.ansible/tmp/ansible-tmp-1539597525.47-108280598146597/AnsiballZ_mysql_db.py
<localhost> SSH: EXEC sftp -b - -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=azielke -o ConnectTimeout=10 -o ControlPath=/home/azielke/.ansible/cp/d75ede5cf8 '[localhost]'
<localhost> (0, 'sftp> put /home/azielke/.ansible/tmp/ansible-local-25745avF4wJ/tmpYP1hby /home/azielke/.ansible/tmp/ansible-tmp-1539597525.47-108280598146597/AnsiballZ_mysql_db.py\n', '')
<localhost> ESTABLISH SSH CONNECTION FOR USER: azielke
<localhost> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=azielke -o ConnectTimeout=10 -o ControlPath=/home/azielke/.ansible/cp/d75ede5cf8 localhost '/bin/sh -c '"'"'chmod u+x /home/azielke/.ansible/tmp/ansible-tmp-1539597525.47-108280598146597/ /home/azielke/.ansible/tmp/ansible-tmp-1539597525.47-108280598146597/AnsiballZ_mysql_db.py && sleep 0'"'"''
<localhost> (0, '', '')
<localhost> ESTABLISH SSH CONNECTION FOR USER: azielke
<localhost> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=azielke -o ConnectTimeout=10 -o ControlPath=/home/azielke/.ansible/cp/d75ede5cf8 -tt localhost '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-rgxvvekydkniwiefxzmpltfsszrnobdi; /usr/bin/python /home/azielke/.ansible/tmp/ansible-tmp-1539597525.47-108280598146597/AnsiballZ_mysql_db.py'"'"'"'"'"'"'"'"' && sleep 0'"'"''
Escalation succeeded
<localhost> (1, '\r\n\r\n{"msg": "error creating database: (1007, \\"Can\'t create database \'dummy.tld\'; database exists\\")", "failed": true, "exception": "Traceback (most recent call last):\\n  File \\"/tmp/ansible_mysql_db_payload_yBdsdw/__main__.py\\", line 381, in main\\n    changed = db_create(cursor, db, encoding, collation)\\n  File \\"/tmp/ansible_mysql_db_payload_yBdsdw/__main__.py\\", line 248, in db_create\\n    cursor.execute(query, query_params)\\n  File \\"/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py\\", line 226, in execute\\n    self.errorhandler(self, exc, value)\\n  File \\"/usr/lib/python2.7/dist-packages/MySQLdb/connections.py\\", line 36, in defaulterrorhandler\\n    raise errorvalue\\nProgrammingError: (1007, \\"Can\'t create database \'dummy.tld\'; database exists\\")\\n", "invocation": {"module_args": {"ssl_key": null, "login_port": 3306, "config_file": "/root/.my.cnf", "name": "`dummy.tld`", "encoding": "", "login_user": null, "login_host": "localhost", "ignore_tables": [], "ssl_ca": null, "login_unix_socket": null, "state": "present", "ssl_cert": null, "login_password": null, "collation": "", "quick": true, "target": null, "connect_timeout": 30, "single_transaction": false}}}\r\n', 'Shared connection to localhost closed.\r\n')
<localhost> ESTABLISH SSH CONNECTION FOR USER: azielke
<localhost> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=azielke -o ConnectTimeout=10 -o ControlPath=/home/azielke/.ansible/cp/d75ede5cf8 localhost '/bin/sh -c '"'"'rm -f -r /home/azielke/.ansible/tmp/ansible-tmp-1539597525.47-108280598146597/ > /dev/null 2>&1 && sleep 0'"'"''
<localhost> (0, '', '')
The full traceback is:
Traceback (most recent call last):
  File "/tmp/ansible_mysql_db_payload_yBdsdw/__main__.py", line 381, in main
    changed = db_create(cursor, db, encoding, collation)
  File "/tmp/ansible_mysql_db_payload_yBdsdw/__main__.py", line 248, in db_create
    cursor.execute(query, query_params)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 226, in execute
    self.errorhandler(self, exc, value)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorvalue
ProgrammingError: (1007, "Can't create database 'dummy.tld'; database exists")

fatal: [localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "collation": "",
            "config_file": "/root/.my.cnf",
            "connect_timeout": 30,
            "encoding": "",
            "ignore_tables": [],
            "login_host": "localhost",
            "login_password": null,
            "login_port": 3306,
            "login_unix_socket": null,
            "login_user": null,
            "name": "`dummy.tld`",
            "quick": true,
            "single_transaction": false,
            "ssl_ca": null,
            "ssl_cert": null,
            "ssl_key": null,
            "state": "present",
            "target": null
        }
    },
    "msg": "error creating database: (1007, \"Can't create database 'dummy.tld'; database exists\")"
}

postgresql modules: allow users to pass inputs containting dots where possible

SUMMARY

postgresql modules:

  1. allow users to pass inputs containting dots where possible
  2. add trust_input parameter

Related to #106

Already done for:
postgresql_user
postgresql_privs
postgresql_owner
postgresql_membership
postgresql_db
postgresql_tablespace
postgresql_schema

Can be implemented similar to
#198

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

postgresql modules

c.g: Failing tests

SUMMARY

A current complete CI run: https://app.shippable.com/github/ansible-collections/community.general/runs/313/summary/console

Disabled or failing integration tests:

xfs_quota/aliases:disabled #fixme

The xfs_quota tests depend on mount, which is currently broken (see ansible/ansible#68223 and ansible-collections/ansible.posix#3).

Deprecated modules, to be removed in 2.10 (I guess we can do that once ansible/ansible#67684 has been merged):

plugins/modules/cloud/misc/ovirt.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/misc/ovirt.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'This module is for deprecated version of ovirt.', 'alternative': 'Use M(ovirt_vm) instead'}
plugins/modules/cloud/ovirt/ovirt_affinity_label_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_affinity_label_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_affinity_label_info) instead'}
plugins/modules/cloud/ovirt/ovirt_api_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_api_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_api_info) instead'}
plugins/modules/cloud/ovirt/ovirt_cluster_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_cluster_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_cluster_info) instead'}
plugins/modules/cloud/ovirt/ovirt_datacenter_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_datacenter_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_datacenter_info) instead'}
plugins/modules/cloud/ovirt/ovirt_disk_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_disk_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_disk_info) instead'}
plugins/modules/cloud/ovirt/ovirt_event_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_event_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_event_info) instead'}
plugins/modules/cloud/ovirt/ovirt_external_provider_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_external_provider_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_external_provider_info) instead'}
plugins/modules/cloud/ovirt/ovirt_group_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_group_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_group_info) instead'}
plugins/modules/cloud/ovirt/ovirt_host_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_host_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_host_info) instead'}
plugins/modules/cloud/ovirt/ovirt_host_storage_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_host_storage_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_host_storage_info) instead'}
plugins/modules/cloud/ovirt/ovirt_network_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_network_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_network_info) instead'}
plugins/modules/cloud/ovirt/ovirt_nic_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_nic_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_nic_info) instead'}
plugins/modules/cloud/ovirt/ovirt_permission_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_permission_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_permission_info) instead'}
plugins/modules/cloud/ovirt/ovirt_quota_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_quota_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_quota_info) instead'}
plugins/modules/cloud/ovirt/ovirt_scheduling_policy_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_scheduling_policy_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_scheduling_policy_info) instead'}
plugins/modules/cloud/ovirt/ovirt_snapshot_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_snapshot_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_snapshot_info) instead'}
plugins/modules/cloud/ovirt/ovirt_storage_domain_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_storage_domain_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_storage_domain_info) instead'}
plugins/modules/cloud/ovirt/ovirt_storage_template_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_storage_template_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_storage_template_info) instead'}
plugins/modules/cloud/ovirt/ovirt_storage_vm_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_storage_vm_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_storage_vm_info) instead'}
plugins/modules/cloud/ovirt/ovirt_tag_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_tag_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_tag_info) instead'}
plugins/modules/cloud/ovirt/ovirt_template_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_template_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_template_info) instead'}
plugins/modules/cloud/ovirt/ovirt_user_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_user_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_user_info) instead'}
plugins/modules/cloud/ovirt/ovirt_vm_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_vm_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_vm_info) instead'}
plugins/modules/cloud/ovirt/ovirt_vmpool_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/ovirt/ovirt_vmpool_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.10', 'why': 'When migrating to collection we decided to use only _info modules.', 'alternative': 'Use M(ovirt_vmpool_info) instead'}

Deprecated modules, to be removed in later versions (need to be updated once ansible/ansible#67684 is merged):

plugins/modules/cloud/cloudstack/cs_instance_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/cloudstack/cs_instance_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.13', 'why': 'Transformed into an info module.', 'alternative': 'Use M(cs_instance_info) instead.'}
plugins/modules/cloud/cloudstack/cs_zone_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/cloudstack/cs_zone_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.13', 'why': 'Transformed into an info module.', 'alternative': 'Use M(cs_zone_info) instead.'}
plugins/modules/cloud/digital_ocean/digital_ocean.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/digital_ocean/digital_ocean.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.12', 'why': 'Updated module to remove external dependency with increased functionality.', 'alternative': 'Use M(digital_ocean_droplet) instead.'}
plugins/modules/cloud/digital_ocean/digital_ocean_sshkey_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/digital_ocean/digital_ocean_sshkey_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.13', 'why': 'Deprecated in favour of C(_info) module.', 'alternative': 'Use M(digital_ocean_sshkey_info) instead.'}
plugins/modules/cloud/google/gcdns_record.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/google/gcdns_record.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.12', 'why': 'Updated modules released with increased functionality', 'alternative': 'Use M(gcp_dns_resource_record_set) instead.'}
plugins/modules/cloud/google/gcdns_zone.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/google/gcdns_zone.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.12', 'why': 'Updated modules released with increased functionality', 'alternative': 'Use M(gcp_dns_managed_zone) instead.'}
plugins/modules/cloud/google/gce.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/google/gce.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.12', 'why': 'Updated modules released with increased functionality', 'alternative': 'Use M(gcp_compute_instance) instead.'}
plugins/modules/cloud/google/gcp_backend_service.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/google/gcp_backend_service.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.12', 'why': 'Updated modules released with increased functionality', 'alternative': 'Use M(gcp_compute_backend_service) instead.'}
plugins/modules/cloud/online/online_server_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/online/online_server_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.13', 'why': 'Deprecated in favour of C(_info) module.', 'alternative': 'Use M(online_server_info) instead.'}
plugins/modules/cloud/online/online_user_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/online/online_user_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.13', 'why': 'Deprecated in favour of C(_info) module.', 'alternative': 'Use M(online_user_info) instead.'}
plugins/modules/cloud/scaleway/scaleway_image_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/scaleway/scaleway_image_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.13', 'why': 'Deprecated in favour of C(_info) module.', 'alternative': 'Use M(scaleway_image_info) instead.'}
plugins/modules/cloud/scaleway/scaleway_ip_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/scaleway/scaleway_ip_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.13', 'why': 'Deprecated in favour of C(_info) module.', 'alternative': 'Use M(scaleway_ip_info) instead.'}
plugins/modules/cloud/scaleway/scaleway_organization_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/scaleway/scaleway_organization_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.13', 'why': 'Deprecated in favour of C(_info) module.', 'alternative': 'Use M(scaleway_organization_info) instead.'}
plugins/modules/cloud/scaleway/scaleway_security_group_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/scaleway/scaleway_security_group_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.13', 'why': 'Deprecated in favour of C(_info) module.', 'alternative': 'Use M(scaleway_security_group_info) instead.'}
plugins/modules/cloud/scaleway/scaleway_server_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/scaleway/scaleway_server_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.13', 'why': 'Deprecated in favour of C(_info) module.', 'alternative': 'Use M(scaleway_server_info) instead.'}
plugins/modules/cloud/scaleway/scaleway_snapshot_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/scaleway/scaleway_snapshot_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.13', 'why': 'Deprecated in favour of C(_info) module.', 'alternative': 'Use M(scaleway_snapshot_info) instead.'}
plugins/modules/cloud/scaleway/scaleway_volume_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/scaleway/scaleway_volume_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.13', 'why': 'Deprecated in favour of C(_info) module.', 'alternative': 'Use M(scaleway_volume_info) instead.'}
plugins/modules/cloud/vultr/_vultr_account_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/vultr/vultr_account_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/vultr/vultr_account_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.12', 'why': 'Transformed into an info module.', 'alternative': 'Use M(vultr_account_info) instead.'}
plugins/modules/cloud/vultr/vultr_block_storage_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/vultr/vultr_block_storage_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.12', 'why': 'Transformed into an info module.', 'alternative': 'Use M(vultr_block_storage_info) instead.'}
plugins/modules/cloud/vultr/vultr_dns_domain_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/vultr/vultr_dns_domain_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.13', 'why': 'Deprecated in favour of C(_info) module.', 'alternative': 'Use M(vultr_dns_domain_info) instead.'}
plugins/modules/cloud/vultr/vultr_firewall_group_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/vultr/vultr_firewall_group_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.13', 'why': 'Deprecated in favour of C(_info) module.', 'alternative': 'Use M(vultr_firewall_group_info) instead.'}
plugins/modules/cloud/vultr/vultr_network_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/vultr/vultr_network_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.13', 'why': 'Deprecated in favour of C(_info) module.', 'alternative': 'Use M(vultr_network_info) instead.'}
plugins/modules/cloud/vultr/vultr_os_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/vultr/vultr_os_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.12', 'why': 'Transformed into an info module.', 'alternative': 'Use M(vultr_os_info) instead.'}
plugins/modules/cloud/vultr/vultr_plan_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/vultr/vultr_plan_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.13', 'why': 'Deprecated in favour of C(_info) module.', 'alternative': 'Use M(vultr_plan_info) instead.'}
plugins/modules/cloud/vultr/vultr_region_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/vultr/vultr_region_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.13', 'why': 'Deprecated in favour of C(_info) module.', 'alternative': 'Use M(vultr_region_info) instead.'}
plugins/modules/cloud/vultr/vultr_server_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/vultr/vultr_server_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.13', 'why': 'Deprecated in favour of C(_info) module.', 'alternative': 'Use M(vultr_server_info) instead.'}
plugins/modules/cloud/vultr/vultr_ssh_key_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/vultr/vultr_ssh_key_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.12', 'why': 'Transformed into an info module.', 'alternative': 'Use M(vultr_ssh_key_info) instead.'}
plugins/modules/cloud/vultr/vultr_startup_script_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/vultr/vultr_startup_script_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.13', 'why': 'Deprecated in favour of C(_info) module.', 'alternative': 'Use M(vultr_startup_script_info) instead.'}
plugins/modules/cloud/vultr/vultr_user_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/cloud/vultr/vultr_user_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.12', 'why': 'Transformed into an info module.', 'alternative': 'Use M(vultr_user_info) instead.'}
plugins/modules/net_tools/ldap/ldap_attr.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/net_tools/ldap/ldap_attr.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.14', 'why': 'The current "ldap_attr" module does not support LDAP attribute insertions or deletions with objectClass dependencies.', 'alternative': 'Use M(ldap_attrs) instead. Deprecated in 2.10.'}
plugins/modules/remote_management/foreman/foreman.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/remote_management/foreman/foreman.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.12', 'why': 'Replaced by re-designed individual modules living at https://github.com/theforeman/foreman-ansible-modules', 'alternative': 'https://github.com/theforeman/foreman-ansible-modules'}
plugins/modules/remote_management/foreman/katello.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/remote_management/foreman/katello.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.12', 'why': 'Replaced by re-designed individual modules living at https://github.com/theforeman/foreman-ansible-modules', 'alternative': 'https://github.com/theforeman/foreman-ansible-modules'}
plugins/modules/source_control/github/github_hooks.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/source_control/github/github_hooks.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.12', 'why': 'Replaced by more granular modules', 'alternative': 'Use M(github_webhook) and M(github_webhook_info) instead.'}
plugins/modules/storage/purestorage/purefa_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/storage/purestorage/purefa_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.13', 'why': 'Deprecated in favor of C(_info) module.', 'alternative': 'Use M(purefa_info) instead.'}
plugins/modules/storage/purestorage/purefb_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/storage/purestorage/purefb_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.13', 'why': 'Deprecated in favor of C(_info) module.', 'alternative': 'Use M(purefb_info) instead.'}
plugins/modules/web_infrastructure/nginx_status_facts.py:0:0: deprecation-mismatch: Module deprecation/removed must agree in Metadata, by prepending filename with "_", and setting DOCUMENTATION.deprecated for deprecation or by removing all documentation for removed
plugins/modules/web_infrastructure/nginx_status_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: extra keys not allowed @ data['deprecated']. Got {'removed_in': '2.13', 'why': 'Deprecated in favour of C(_info) module.', 'alternative': 'Use M(nginx_status_info) instead.'}
ISSUE TYPE
  • Bug Report
COMPONENT NAME

all

ANSIBLE VERSION
unrelated

Module `postgresql_query` cannot cope with identifiers

Copied from ansible/ansible#58644
Initially reported by @cans

SUMMARY

The postgresql_query module cannot be used with any query that requires an identifier as an argument. Indeed as per the documentation, the underlying python DB API implementation (psycopg2) require a string containing a indentifier to be "annotated" as a psycopg2.sql.Identifier instance. If not the string is systematically surrounded with quotes. It would be nice to be able to do such thing.

- hosts: db
  tasks:
    - name: "Configure foreign data wrapper"
      postgresql_query:
          positional_args:
            - "servername"
            - "hostname.domain.tld"
          query: ALTER SERVER %s OPTIONS (SET host %s)
          # and the required connection parameters 

This query is rewritten ALTER SERVER 'server-name' OPTIONS (SET host 'hostname.domain.tld') which is invalid and will fail with the error:

{"msg": "Cannot execute SQL 'ALTER SERVER %s OPTIONS (SET host %s)\n' ['servername', 'hostname.domain.tld']: syntax error at or near \"'servername'\"\nLINE 1: ALTER SERVER 'servername' OPTIONS (SET host 'hostname.doma...\n                     ^\n"}

In the end you are better off using the command module to call psql. It is a bit of a pity.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

postgresql_query

This issue may apply to other database modules (though with different manifestations and solutions).

ADDITIONAL INFORMATION
- hosts: db
  tasks:
    - name: "Configure foreign data wrapper"
      postgresql_query:
          positional_args:
            - "{{ 'servername' | pgidentifier }}"  # Or a variable instead of a literal
            - "hostname.domain.tld"
          query: ALTER SERVER %s OPTIONS (SET host %s)
          # and the required connection parameters 

This query would be rewritten ALTER SERVER "server-name" OPTIONS (SET host 'hostname.domain.tld') as expected.

I quickly tried to put together a filter plugin that does the above. But the value keeps being turned to a string `"'Identifier('servername')'", which is no better (cf. GIST below).

https://gist.github.com/cans/165ecb5042e8c45b6cd5db18227f1c1f

jira module search operation is broken in python 2

SUMMARY

In the current master branch, in the jira module's search operation, there's a call to urllib.request.pathname2url which works fine in Python 3 but throws an error in Python 2. It's because of the changes to the urlib component in Python 3 which changed the location of the pathname2url function. The current code is not Python 2 compatible.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

jira

ANSIBLE VERSION

I'm using 2.9, but it's not relevant here because the jira module I'm using is not released yet. See #22 where this code was added a short time ago.

I am seeing this error on this workstation using connection: local, so I presume it's using python 2 when the module runs:

$ which python
/usr/bin/python
$ `which python` --version
Python 2.7.16

Anyway:

ansible 2.9.5
  config file = /home/sbaird/dev/ansible-playbooks/errata-tool-playbooks/ansible.cfg
  configured module search path = ['/home/sbaird/dev/ansible-playbooks/errata-tool-playbooks/modules']
  ansible python module location = /usr/lib/python3.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.7.4 (default, Jul  9 2019, 16:32:37) [GCC 9.1.1 20190503 (Red Hat 9.1.1-1)]
CONFIGURATION
OS / ENVIRONMENT

Fedora and RHEL

STEPS TO REPRODUCE
  • Try using jira search operation on a system with Python 2 using the yet unreleased jira module in the latest master branch, (from #22).
EXPECTED RESULTS
  • Task suceeds.
ACTUAL RESULTS
  • Tasks fails with an error something like this:
The full traceback is:
WARNING: The below traceback may *not* be related to the actual failure.
  File "/tmp/ansible_jira_future_payload_7sKAgF/ansible_jira_future_payload.zip/ansible/modules/jira_future.py", line 541, in main
  File "/tmp/ansible_jira_future_payload_7sKAgF/ansible_jira_future_payload.zip/ansible/modules/jira_future.py", line 422, in search
fatal: [errata-web-01.dev.eng.bne.redhat.com]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "assignee": null,
            ...snip the rest of the module args...
        }
    },
    "msg": "'module' object has no attribute 'request'"
}

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.