mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-30 10:26:52 +00:00
Compare commits
59 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b90f87f3d8 | ||
|
|
b23fdc3be3 | ||
|
|
bc83586c15 | ||
|
|
b765938b79 | ||
|
|
4ed5177d60 | ||
|
|
88ac419c0e | ||
|
|
cc63dd884c | ||
|
|
d817fc7215 | ||
|
|
64897d762c | ||
|
|
64cbf1900b | ||
|
|
7e23ef3801 | ||
|
|
27fc80895c | ||
|
|
0754449d60 | ||
|
|
460cd523fe | ||
|
|
ad2d899713 | ||
|
|
3182be1a2f | ||
|
|
b726110f1f | ||
|
|
24a4d6e685 | ||
|
|
1badcffe1c | ||
|
|
b87196348a | ||
|
|
21423ca6a0 | ||
|
|
4926f15d86 | ||
|
|
9466103a4a | ||
|
|
b26df2a008 | ||
|
|
cba4fa2fe8 | ||
|
|
833530ab47 | ||
|
|
1f0361a1c6 | ||
|
|
4df53dbacf | ||
|
|
f25519e308 | ||
|
|
1bb47ad73e | ||
|
|
fd3e84fcd6 | ||
|
|
f75471e7d2 | ||
|
|
aadf1d4f6a | ||
|
|
f5ff54979a | ||
|
|
957a74b525 | ||
|
|
29afed337a | ||
|
|
e748acdd51 | ||
|
|
eed45fe6aa | ||
|
|
cce52e1812 | ||
|
|
0bcce340ed | ||
|
|
da8a11b8d8 | ||
|
|
9ed0603072 | ||
|
|
e2fa11b381 | ||
|
|
36f7ff15e9 | ||
|
|
8eac491057 | ||
|
|
607f3d83a0 | ||
|
|
d6cd90838f | ||
|
|
22e0a6dac7 | ||
|
|
3751e188ca | ||
|
|
cd4f3ca445 | ||
|
|
1d05f81e53 | ||
|
|
4ef80ecd46 | ||
|
|
68e184eba8 | ||
|
|
5dcd2c7df5 | ||
|
|
134a0dc7e2 | ||
|
|
13e3e176fb | ||
|
|
eb98be580d | ||
|
|
49ef8b1900 | ||
|
|
19d22d605a |
@@ -30,13 +30,12 @@ schedules:
|
||||
branches:
|
||||
include:
|
||||
- stable-5
|
||||
- stable-4
|
||||
- cron: 0 11 * * 0
|
||||
displayName: Weekly (old stable branches)
|
||||
always: true
|
||||
branches:
|
||||
include:
|
||||
- stable-3
|
||||
- stable-4
|
||||
|
||||
variables:
|
||||
- name: checkoutPath
|
||||
@@ -392,56 +391,56 @@ stages:
|
||||
- 2
|
||||
- 3
|
||||
|
||||
### Cloud
|
||||
- stage: Cloud_devel
|
||||
displayName: Cloud devel
|
||||
### Generic
|
||||
- stage: Generic_devel
|
||||
displayName: Generic devel
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
nameFormat: Python {0}
|
||||
testFormat: devel/cloud/{0}/1
|
||||
testFormat: devel/generic/{0}/1
|
||||
targets:
|
||||
- test: 2.7
|
||||
- test: '3.11'
|
||||
- stage: Cloud_2_14
|
||||
displayName: Cloud 2.14
|
||||
- stage: Generic_2_14
|
||||
displayName: Generic 2.14
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
nameFormat: Python {0}
|
||||
testFormat: 2.14/cloud/{0}/1
|
||||
testFormat: 2.14/generic/{0}/1
|
||||
targets:
|
||||
- test: '3.10'
|
||||
- stage: Cloud_2_13
|
||||
displayName: Cloud 2.13
|
||||
- stage: Generic_2_13
|
||||
displayName: Generic 2.13
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
nameFormat: Python {0}
|
||||
testFormat: 2.13/cloud/{0}/1
|
||||
testFormat: 2.13/generic/{0}/1
|
||||
targets:
|
||||
- test: 3.9
|
||||
- stage: Cloud_2_12
|
||||
displayName: Cloud 2.12
|
||||
- stage: Generic_2_12
|
||||
displayName: Generic 2.12
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
nameFormat: Python {0}
|
||||
testFormat: 2.12/cloud/{0}/1
|
||||
testFormat: 2.12/generic/{0}/1
|
||||
targets:
|
||||
- test: 3.8
|
||||
- stage: Cloud_2_11
|
||||
displayName: Cloud 2.11
|
||||
- stage: Generic_2_11
|
||||
displayName: Generic 2.11
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
nameFormat: Python {0}
|
||||
testFormat: 2.11/cloud/{0}/1
|
||||
testFormat: 2.11/generic/{0}/1
|
||||
targets:
|
||||
- test: 2.7
|
||||
- test: 3.5
|
||||
@@ -470,10 +469,10 @@ stages:
|
||||
- Docker_2_13
|
||||
- Docker_2_14
|
||||
- Docker_community_devel
|
||||
- Cloud_devel
|
||||
- Cloud_2_11
|
||||
- Cloud_2_12
|
||||
- Cloud_2_13
|
||||
- Cloud_2_14
|
||||
- Generic_devel
|
||||
- Generic_2_11
|
||||
- Generic_2_12
|
||||
- Generic_2_13
|
||||
- Generic_2_14
|
||||
jobs:
|
||||
- template: templates/coverage.yml
|
||||
|
||||
135
.github/BOTMETA.yml
vendored
135
.github/BOTMETA.yml
vendored
@@ -327,13 +327,13 @@ files:
|
||||
$module_utils/xfconf.py:
|
||||
maintainers: russoz
|
||||
labels: xfconf
|
||||
$modules/cloud/alicloud/:
|
||||
$modules/cloud/alicloud/ali_:
|
||||
maintainers: xiaozhu36
|
||||
$modules/cloud/atomic/atomic_container.py:
|
||||
maintainers: giuseppe krsacme
|
||||
$modules/cloud/atomic/:
|
||||
$modules/cloud/atomic/atomic_:
|
||||
maintainers: krsacme
|
||||
$modules/cloud/centurylink/:
|
||||
$modules/cloud/centurylink/clc_:
|
||||
maintainers: clc-runner
|
||||
$modules/cloud/dimensiondata/dimensiondata_network.py:
|
||||
maintainers: aimonb tintoy
|
||||
@@ -342,22 +342,22 @@ files:
|
||||
maintainers: tintoy
|
||||
$modules/cloud/heroku/heroku_collaborator.py:
|
||||
maintainers: marns93
|
||||
$modules/cloud/huawei/:
|
||||
$modules/cloud/huawei/hwc_:
|
||||
maintainers: $team_huawei huaweicloud
|
||||
keywords: cloud huawei hwc
|
||||
$modules/cloud/linode/:
|
||||
$modules/cloud/linode/linode:
|
||||
maintainers: $team_linode
|
||||
$modules/cloud/linode/linode.py:
|
||||
maintainers: zbal
|
||||
$modules/cloud/lxc/lxc_container.py:
|
||||
maintainers: cloudnull
|
||||
$modules/cloud/lxd/:
|
||||
$modules/cloud/lxd/lxd_:
|
||||
ignore: hnakamur
|
||||
$modules/cloud/lxd/lxd_profile.py:
|
||||
maintainers: conloos
|
||||
$modules/cloud/lxd/lxd_project.py:
|
||||
maintainers: we10710aa
|
||||
$modules/cloud/memset/:
|
||||
$modules/cloud/memset/memset_:
|
||||
maintainers: glitchcrab
|
||||
$modules/cloud/misc/cloud_init_data_facts.py:
|
||||
maintainers: resmo
|
||||
@@ -385,41 +385,42 @@ files:
|
||||
labels: rhevm virt
|
||||
ignore: skvidal
|
||||
keywords: kvm libvirt proxmox qemu
|
||||
$modules/cloud/misc/:
|
||||
$modules/cloud/misc/serverless.py:
|
||||
ignore: ryansb
|
||||
$modules/cloud/misc/terraform.py:
|
||||
maintainers: m-yosefpor rainerleber
|
||||
ignore: ryansb
|
||||
$modules/cloud/misc/xenserver_facts.py:
|
||||
maintainers: caphrim007 cheese
|
||||
labels: xenserver_facts
|
||||
ignore: andyhky
|
||||
$modules/cloud/oneandone/:
|
||||
ignore: andyhky ryansb
|
||||
$modules/cloud/oneandone/oneandone_:
|
||||
maintainers: aajdinov edevenport
|
||||
$modules/cloud/online/:
|
||||
$modules/cloud/online/online_:
|
||||
maintainers: remyleone
|
||||
$modules/cloud/opennebula/:
|
||||
$modules/cloud/opennebula/one_:
|
||||
maintainers: $team_opennebula
|
||||
$modules/cloud/opennebula/one_host.py:
|
||||
maintainers: rvalle
|
||||
$modules/cloud/oracle/oci_vcn.py:
|
||||
maintainers: $team_oracle rohitChaware
|
||||
$modules/cloud/ovh/:
|
||||
$modules/cloud/ovh/ovh_:
|
||||
maintainers: pascalheraud
|
||||
$modules/cloud/ovh/ovh_monthly_billing.py:
|
||||
maintainers: fraff
|
||||
$modules/cloud/packet/packet_device.py:
|
||||
maintainers: baldwinSPC t0mk teebes
|
||||
$modules/cloud/packet/:
|
||||
$modules/cloud/packet/packet_:
|
||||
maintainers: nurfet-becirevic t0mk
|
||||
$modules/cloud/packet/packet_sshkey.py:
|
||||
maintainers: t0mk
|
||||
$modules/cloud/profitbricks/:
|
||||
$modules/cloud/profitbricks/profitbricks:
|
||||
maintainers: baldwinSPC
|
||||
$modules/cloud/pubnub/pubnub_blocks.py:
|
||||
maintainers: parfeon pubnub
|
||||
$modules/cloud/rackspace/rax.py:
|
||||
maintainers: omgjlk sivel
|
||||
$modules/cloud/rackspace/:
|
||||
$modules/cloud/rackspace/rax:
|
||||
ignore: ryansb sivel
|
||||
$modules/cloud/rackspace/rax_cbs.py:
|
||||
maintainers: claco
|
||||
@@ -457,10 +458,14 @@ files:
|
||||
maintainers: smashwilson
|
||||
$modules/cloud/rackspace/rax_queue.py:
|
||||
maintainers: claco
|
||||
$modules/cloud/scaleway/:
|
||||
$modules/cloud/scaleway/scaleway_:
|
||||
maintainers: $team_scaleway
|
||||
$modules/cloud/scaleway/scaleway_compute_private_network.py:
|
||||
maintainers: pastral
|
||||
$modules/cloud/scaleway/scaleway_container_registry.py:
|
||||
maintainers: Lunik
|
||||
$modules/cloud/scaleway/scaleway_container_registry_info.py:
|
||||
maintainers: Lunik
|
||||
$modules/cloud/scaleway/scaleway_database_backup.py:
|
||||
maintainers: guillaume_ro_fr
|
||||
$modules/cloud/scaleway/scaleway_image_info.py:
|
||||
@@ -486,29 +491,39 @@ files:
|
||||
ignore: hekonsek
|
||||
$modules/cloud/scaleway/scaleway_volume_info.py:
|
||||
maintainers: Spredzy
|
||||
$modules/cloud/smartos/:
|
||||
$modules/cloud/smartos/imgadm.py:
|
||||
maintainers: $team_solaris
|
||||
labels: solaris
|
||||
keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool
|
||||
$modules/cloud/smartos/nictagadm.py:
|
||||
maintainers: SmithX10
|
||||
maintainers: $team_solaris SmithX10
|
||||
labels: solaris
|
||||
keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool
|
||||
$modules/cloud/smartos/smartos_image_info.py:
|
||||
maintainers: $team_solaris
|
||||
labels: solaris
|
||||
keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool
|
||||
$modules/cloud/smartos/vmadm.py:
|
||||
maintainers: $team_solaris
|
||||
labels: solaris
|
||||
keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool
|
||||
$modules/cloud/softlayer/sl_vm.py:
|
||||
maintainers: mcltn
|
||||
$modules/cloud/spotinst/spotinst_aws_elastigroup.py:
|
||||
maintainers: talzur
|
||||
$modules/cloud/univention/:
|
||||
$modules/cloud/univention/udm_:
|
||||
maintainers: keachi
|
||||
$modules/cloud/webfaction/:
|
||||
$modules/cloud/webfaction/webfaction_:
|
||||
maintainers: quentinsf
|
||||
$modules/cloud/xenserver/:
|
||||
$modules/cloud/xenserver/xenserver_:
|
||||
maintainers: bvitnik
|
||||
$modules/clustering/consul/:
|
||||
$modules/clustering/consul/consul:
|
||||
maintainers: $team_consul
|
||||
ignore: colin-nolan
|
||||
$modules/clustering/etcd3.py:
|
||||
maintainers: evrardjp
|
||||
ignore: vfauth
|
||||
$modules/clustering/nomad/:
|
||||
$modules/clustering/nomad/nomad_:
|
||||
maintainers: chris93111
|
||||
$modules/clustering/pacemaker_cluster.py:
|
||||
maintainers: matbu
|
||||
@@ -516,7 +531,7 @@ files:
|
||||
maintainers: treyperry
|
||||
$modules/database/aerospike/aerospike_migrations.py:
|
||||
maintainers: Alb0t
|
||||
$modules/database/influxdb/:
|
||||
$modules/database/influxdb/influxdb_:
|
||||
maintainers: kamsz
|
||||
$modules/database/influxdb/influxdb_query.py:
|
||||
maintainers: resmo
|
||||
@@ -550,7 +565,7 @@ files:
|
||||
labels: mssql_script
|
||||
$modules/database/saphana/hana_query.py:
|
||||
maintainers: rainerleber
|
||||
$modules/database/vertica/:
|
||||
$modules/database/vertica/vertica_:
|
||||
maintainers: dareko
|
||||
$modules/files/archive.py:
|
||||
maintainers: bendoh
|
||||
@@ -560,6 +575,8 @@ files:
|
||||
maintainers: jpmens noseka1
|
||||
$modules/files/iso_create.py:
|
||||
maintainers: Tomorrow9
|
||||
$modules/files/iso_customize.py:
|
||||
maintainers: ZouYuhua
|
||||
$modules/files/iso_extract.py:
|
||||
maintainers: dagwieers jhoekx ribbons
|
||||
$modules/files/read_csv.py:
|
||||
@@ -573,7 +590,7 @@ files:
|
||||
maintainers: dagwieers magnus919 tbielawa cmprescott sm4rk0
|
||||
labels: m:xml xml
|
||||
ignore: magnus919
|
||||
$modules/identity/ipa/:
|
||||
$modules/identity/ipa/ipa_:
|
||||
maintainers: $team_ipa
|
||||
$modules/identity/ipa/ipa_pwpolicy.py:
|
||||
maintainers: adralioh
|
||||
@@ -581,7 +598,7 @@ files:
|
||||
maintainers: cprh
|
||||
$modules/identity/ipa/ipa_vault.py:
|
||||
maintainers: jparrill
|
||||
$modules/identity/keycloak/:
|
||||
$modules/identity/keycloak/keycloak_:
|
||||
maintainers: $team_keycloak
|
||||
$modules/identity/keycloak/keycloak_authentication.py:
|
||||
maintainers: elfelip Gaetan2907
|
||||
@@ -659,10 +676,10 @@ files:
|
||||
maintainers: thaumos
|
||||
$modules/monitoring/rollbar_deployment.py:
|
||||
maintainers: kavu
|
||||
$modules/monitoring/sensu/sensu_:
|
||||
maintainers: dmsimard
|
||||
$modules/monitoring/sensu/sensu_check.py:
|
||||
maintainers: andsens
|
||||
$modules/monitoring/sensu/:
|
||||
maintainers: dmsimard
|
||||
$modules/monitoring/sensu/sensu_silence.py:
|
||||
maintainers: smbambling
|
||||
$modules/monitoring/sensu/sensu_subscription.py:
|
||||
@@ -719,7 +736,7 @@ files:
|
||||
maintainers: nerzhul
|
||||
$modules/net_tools/omapi_host.py:
|
||||
maintainers: amasolov nerzhul
|
||||
$modules/net_tools/pritunl/:
|
||||
$modules/net_tools/pritunl/pritunl_:
|
||||
maintainers: Lowess
|
||||
$modules/net_tools/nmcli.py:
|
||||
maintainers: alcamie101
|
||||
@@ -768,7 +785,8 @@ files:
|
||||
labels: rocketchat
|
||||
ignore: ramondelafuente
|
||||
$modules/notification/say.py:
|
||||
maintainers: $team_ansible_core mpdehaan
|
||||
maintainers: $team_ansible_core
|
||||
ignore: mpdehaan
|
||||
$modules/notification/sendgrid.py:
|
||||
maintainers: makaimc
|
||||
$modules/notification/slack.py:
|
||||
@@ -955,21 +973,24 @@ files:
|
||||
maintainers: $team_suse
|
||||
labels: zypper
|
||||
ignore: matze
|
||||
$modules/remote_management/cobbler/:
|
||||
$modules/remote_management/cobbler/cobbler_:
|
||||
maintainers: dagwieers
|
||||
$modules/remote_management/hpilo/:
|
||||
$modules/remote_management/hpilo/hpilo_:
|
||||
maintainers: haad
|
||||
ignore: dagwieers
|
||||
$modules/remote_management/hpilo/hponcfg.py:
|
||||
maintainers: haad
|
||||
ignore: dagwieers
|
||||
$modules/remote_management/imc/imc_rest.py:
|
||||
maintainers: dagwieers
|
||||
labels: cisco
|
||||
$modules/remote_management/ipmi/:
|
||||
$modules/remote_management/ipmi/ipmi_:
|
||||
maintainers: bgaifullin cloudnull
|
||||
$modules/remote_management/lenovoxcc/:
|
||||
$modules/remote_management/lenovoxcc/xcc_:
|
||||
maintainers: panyy3 renxulei
|
||||
$modules/remote_management/lxca/:
|
||||
$modules/remote_management/lxca/lxca_:
|
||||
maintainers: navalkp prabhosa
|
||||
$modules/remote_management/manageiq/:
|
||||
$modules/remote_management/manageiq/manageiq_:
|
||||
labels: manageiq
|
||||
maintainers: $team_manageiq
|
||||
$modules/remote_management/manageiq/manageiq_alert_profiles.py:
|
||||
@@ -978,9 +999,13 @@ files:
|
||||
maintainers: elad661
|
||||
$modules/remote_management/manageiq/manageiq_group.py:
|
||||
maintainers: evertmulder
|
||||
$modules/remote_management/manageiq/manageiq_policies_info.py:
|
||||
maintainers: russoz $team_manageiq
|
||||
$modules/remote_management/manageiq/manageiq_tags_info.py:
|
||||
maintainers: russoz $team_manageiq
|
||||
$modules/remote_management/manageiq/manageiq_tenant.py:
|
||||
maintainers: evertmulder
|
||||
$modules/remote_management/oneview/:
|
||||
$modules/remote_management/oneview/oneview_:
|
||||
maintainers: adriane-cardozo fgbulsoni tmiotto
|
||||
$modules/remote_management/oneview/oneview_datacenter_info.py:
|
||||
maintainers: aalexmonteiro madhav-bharadwaj ricardogpsf soodpr
|
||||
@@ -988,7 +1013,16 @@ files:
|
||||
maintainers: fgbulsoni
|
||||
$modules/remote_management/oneview/oneview_fcoe_network.py:
|
||||
maintainers: fgbulsoni
|
||||
$modules/remote_management/redfish/:
|
||||
$modules/remote_management/redfish/idrac_:
|
||||
maintainers: $team_redfish
|
||||
ignore: jose-delarosa
|
||||
$modules/remote_management/redfish/ilo_:
|
||||
maintainers: $team_redfish
|
||||
ignore: jose-delarosa
|
||||
$modules/remote_management/redfish/redfish_:
|
||||
maintainers: $team_redfish
|
||||
ignore: jose-delarosa
|
||||
$modules/remote_management/redfish/wdc_:
|
||||
maintainers: $team_redfish
|
||||
ignore: jose-delarosa
|
||||
$modules/remote_management/redfish/wdc_redfish_command.py:
|
||||
@@ -1000,7 +1034,7 @@ files:
|
||||
labels: stacki_host
|
||||
$modules/remote_management/wakeonlan.py:
|
||||
maintainers: dagwieers
|
||||
$modules/source_control/bitbucket/:
|
||||
$modules/source_control/bitbucket/bitbucket_:
|
||||
maintainers: catcombo
|
||||
$modules/source_control/bzr.py:
|
||||
maintainers: andreparames
|
||||
@@ -1018,9 +1052,9 @@ files:
|
||||
maintainers: adrianmoisey
|
||||
$modules/source_control/github/github_repo.py:
|
||||
maintainers: atorrescogollo
|
||||
$modules/source_control/github/:
|
||||
$modules/source_control/github/github_:
|
||||
maintainers: stpierre
|
||||
$modules/source_control/gitlab/:
|
||||
$modules/source_control/gitlab/gitlab_:
|
||||
notify: jlozadad
|
||||
maintainers: $team_gitlab
|
||||
keywords: gitlab source_control
|
||||
@@ -1038,13 +1072,13 @@ files:
|
||||
maintainers: remixtj
|
||||
$modules/storage/hpe3par/ss_3par_cpg.py:
|
||||
maintainers: farhan7500 gautamphegde
|
||||
$modules/storage/ibm/:
|
||||
$modules/storage/ibm/ibm_sa_:
|
||||
maintainers: tzure
|
||||
$modules/storage/pmem/pmem.py:
|
||||
maintainers: mizumm
|
||||
$modules/storage/vexata/:
|
||||
$modules/storage/vexata/vexata_:
|
||||
maintainers: vexata
|
||||
$modules/storage/zfs/:
|
||||
$modules/storage/zfs/zfs:
|
||||
maintainers: $team_solaris
|
||||
labels: solaris
|
||||
keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool
|
||||
@@ -1052,6 +1086,10 @@ files:
|
||||
maintainers: johanwiren
|
||||
$modules/storage/zfs/zfs_delegate_admin.py:
|
||||
maintainers: natefoo
|
||||
$modules/storage/zfs/zpool_facts:
|
||||
maintainers: $team_solaris
|
||||
labels: solaris
|
||||
keywords: beadm dladm illumos ipadm nexenta omnios openindiana pfexec smartos solaris sunos zfs zpool
|
||||
$modules/system/aix:
|
||||
maintainers: $team_aix
|
||||
labels: aix
|
||||
@@ -1133,7 +1171,8 @@ files:
|
||||
$modules/system/nosh.py:
|
||||
maintainers: tacatac
|
||||
$modules/system/ohai.py:
|
||||
maintainers: $team_ansible_core mpdehaan
|
||||
maintainers: $team_ansible_core
|
||||
ignore: mpdehaan
|
||||
labels: ohai
|
||||
$modules/system/open_iscsi.py:
|
||||
maintainers: srvg
|
||||
@@ -1249,7 +1288,7 @@ files:
|
||||
maintainers: phsmith
|
||||
$modules/web_infrastructure/rundeck_job_executions_info.py:
|
||||
maintainers: phsmith
|
||||
$modules/web_infrastructure/sophos_utm/:
|
||||
$modules/web_infrastructure/sophos_utm/utm_:
|
||||
maintainers: $team_e_spirit
|
||||
keywords: sophos utm
|
||||
$modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py:
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -509,3 +509,6 @@ $RECYCLE.BIN/
|
||||
*.lnk
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/vim,git,macos,linux,pydev,emacs,dotenv,python,windows,webstorm,pycharm+all,jupyternotebooks
|
||||
|
||||
# Integration tests cloud configs
|
||||
tests/integration/cloud-config-*.ini
|
||||
|
||||
109
CHANGELOG.rst
109
CHANGELOG.rst
@@ -6,6 +6,115 @@ Community General Release Notes
|
||||
|
||||
This changelog describes changes after version 4.0.0.
|
||||
|
||||
v5.8.1
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Regular bugfix release.
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- passwordstore lookup plugin - improve error messages to include stderr (https://github.com/ansible-collections/community.general/pull/5436)
|
||||
|
||||
Deprecated Features
|
||||
-------------------
|
||||
|
||||
- Please note that some tools, like the VScode plugin (https://github.com/ansible/vscode-ansible/issues/573), or ``ansible-doc --list --type module``, suggest to replace the correct FQCNs for modules and actions in community.general with internal names that have more than three components. For example, ``community.general.ufw`` is suggested to be replaced by ``community.general.system.ufw``. While these longer names do work, they are considered **internal names** by the collection and are subject to change and be removed at all time. They **will** be removed in community.general 6.0.0 and result in deprecation messages. Avoid using these internal names, and use general three-component FQCNs (``community.general.<name_of_module>``) instead (https://github.com/ansible-collections/community.general/pull/5373).
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- dependent lookup plugin - avoid warning on deprecated parameter for ``Templar.template()`` (https://github.com/ansible-collections/community.general/pull/5543).
|
||||
- iso_create - the module somtimes failed to add folders for Joliet and UDF formats (https://github.com/ansible-collections/community.general/issues/5275).
|
||||
- ldap_attrs - fix bug which caused a ``Bad search filter`` error. The error was occuring when the ldap attribute value contained special characters such as ``(`` or ``*`` (https://github.com/ansible-collections/community.general/issues/5434, https://github.com/ansible-collections/community.general/pull/5435).
|
||||
- nmcli - fix int options idempotence (https://github.com/ansible-collections/community.general/issues/4998).
|
||||
- nsupdate - fix silent failures when updating ``NS`` entries from Bind9 managed DNS zones (https://github.com/ansible-collections/community.general/issues/4657).
|
||||
- one_vm - avoid splitting labels that are ``None`` (https://github.com/ansible-collections/community.general/pull/5489).
|
||||
- proxmox_disk - avoid duplicate ``vmid`` reference (https://github.com/ansible-collections/community.general/issues/5492, https://github.com/ansible-collections/community.general/pull/5493).
|
||||
- snap - allow values in the ``options`` parameter to contain whitespaces (https://github.com/ansible-collections/community.general/pull/5475).
|
||||
|
||||
v5.8.0
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Regular feature and bugfix release.
|
||||
|
||||
Major Changes
|
||||
-------------
|
||||
|
||||
- newrelic_deployment - removed New Relic v1 API, added support for v2 API (https://github.com/ansible-collections/community.general/pull/5341).
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- consul - minor refactoring (https://github.com/ansible-collections/community.general/pull/5367).
|
||||
- lxc_container - minor refactoring (https://github.com/ansible-collections/community.general/pull/5358).
|
||||
- nmcli - add ``transport_mode`` configuration for Infiniband devices (https://github.com/ansible-collections/community.general/pull/5361).
|
||||
- opentelemetry callback plugin - send logs. This can be disabled by setting ``disable_logs=false`` (https://github.com/ansible-collections/community.general/pull/4175).
|
||||
- portage - add knobs for Portage's ``--backtrack`` and ``--with-bdeps`` options (https://github.com/ansible-collections/community.general/pull/5349).
|
||||
- portage - use Portage's python module instead of calling gentoolkit-provided program in shell (https://github.com/ansible-collections/community.general/pull/5349).
|
||||
- znode - possibility to use ZooKeeper ACL authentication (https://github.com/ansible-collections/community.general/pull/5306).
|
||||
|
||||
Breaking Changes / Porting Guide
|
||||
--------------------------------
|
||||
|
||||
- newrelic_deployment - ``revision`` is required for v2 API (https://github.com/ansible-collections/community.general/pull/5341).
|
||||
|
||||
Deprecated Features
|
||||
-------------------
|
||||
|
||||
- ArgFormat module utils - deprecated along ``CmdMixin``, in favor of the ``cmd_runner_fmt`` module util (https://github.com/ansible-collections/community.general/pull/5370).
|
||||
- CmdMixin module utils - deprecated in favor of the ``CmdRunner`` module util (https://github.com/ansible-collections/community.general/pull/5370).
|
||||
- CmdModuleHelper module utils - deprecated in favor of the ``CmdRunner`` module util (https://github.com/ansible-collections/community.general/pull/5370).
|
||||
- CmdStateModuleHelper module utils - deprecated in favor of the ``CmdRunner`` module util (https://github.com/ansible-collections/community.general/pull/5370).
|
||||
- django_manage - support for Django releases older than 4.1 has been deprecated and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5400).
|
||||
- django_manage - support for the commands ``cleanup``, ``syncdb`` and ``validate`` that have been deprecated in Django long time ago will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5400).
|
||||
- django_manage - the behavior of "creating the virtual environment when missing" is being deprecated and will be removed in community.general version 9.0.0 (https://github.com/ansible-collections/community.general/pull/5405).
|
||||
- newrelic_deployment - ``appname`` and ``environment`` are no longer valid options in the v2 API. They will be removed in community.general 7.0.0 (https://github.com/ansible-collections/community.general/pull/5341).
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- archive - avoid crash when ``lzma`` is not present and ``format`` is not ``xz`` (https://github.com/ansible-collections/community.general/pull/5393).
|
||||
- ldap_attrs - fix ordering issue by ignoring the ``{x}`` prefix on attribute values (https://github.com/ansible-collections/community.general/issues/977, https://github.com/ansible-collections/community.general/pull/5385).
|
||||
- opentelemetry callback plugin - support opentelemetry-api 1.13.0 that removed support for ``_time_ns`` (https://github.com/ansible-collections/community.general/pull/5342).
|
||||
- pfexec become plugin - remove superflous quotes preventing exe wrap from working as expected (https://github.com/ansible-collections/community.general/issues/3671, https://github.com/ansible-collections/community.general/pull/3889).
|
||||
- pkgng - fix case when ``pkg`` fails when trying to upgrade all packages (https://github.com/ansible-collections/community.general/issues/5363).
|
||||
- proxmox_kvm - fix ``agent`` parameter when boolean value is specified (https://github.com/ansible-collections/community.general/pull/5198).
|
||||
- virtualbox inventory plugin - skip parsing values with keys that have both a value and nested data. Skip parsing values that are nested more than two keys deep (https://github.com/ansible-collections/community.general/issues/5332, https://github.com/ansible-collections/community.general/pull/5348).
|
||||
- xenserver_facts - fix broken ``AnsibleModule`` call that prevented the module from working at all (https://github.com/ansible-collections/community.general/pull/5383).
|
||||
|
||||
New Modules
|
||||
-----------
|
||||
|
||||
Cloud
|
||||
~~~~~
|
||||
|
||||
scaleway
|
||||
^^^^^^^^
|
||||
|
||||
- scaleway_container_registry - Scaleway Container registry management module
|
||||
- scaleway_container_registry_info - Scaleway Container registry info module
|
||||
|
||||
Files
|
||||
~~~~~
|
||||
|
||||
- iso_customize - Add/remove/change files in ISO file
|
||||
|
||||
Remote Management
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
manageiq
|
||||
^^^^^^^^
|
||||
|
||||
- manageiq_policies_info - Listing of resource policy_profiles in ManageIQ
|
||||
- manageiq_tags_info - Retrieve resource tags in ManageIQ
|
||||
|
||||
v5.7.0
|
||||
======
|
||||
|
||||
|
||||
@@ -64,6 +64,10 @@ ansible-galaxy collection install community.general:==X.Y.Z
|
||||
|
||||
See [Ansible Using collections](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html) for more details.
|
||||
|
||||
### FQCNs for modules and actions
|
||||
|
||||
⚠️ The collection uses a similar directory structure for modules as the Ansible repository used for Ansible 2.9 and before. This directory structure was never exposed to the user. Due to changes in community.general 5.0.0 (using `meta/runtime.yml` redirects instead of symbolic links) some tooling started exposing the internal module names to end-users. These **internal names**, like `community.general.system.ufw` for the UFW firewall managing module, do work, but should be avoided since they are treated as an implementation detail that can change at any time, even in bugfix releases. Always use the three-component FQCN form, for example `community.general.ufw` for the UFW module. ⚠️
|
||||
|
||||
## 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.
|
||||
|
||||
@@ -1214,3 +1214,141 @@ releases:
|
||||
name: proxmox_disk
|
||||
namespace: cloud.misc
|
||||
release_date: '2022-10-04'
|
||||
5.8.0:
|
||||
changes:
|
||||
breaking_changes:
|
||||
- newrelic_deployment - ``revision`` is required for v2 API (https://github.com/ansible-collections/community.general/pull/5341).
|
||||
bugfixes:
|
||||
- archive - avoid crash when ``lzma`` is not present and ``format`` is not ``xz``
|
||||
(https://github.com/ansible-collections/community.general/pull/5393).
|
||||
- ldap_attrs - fix ordering issue by ignoring the ``{x}`` prefix on attribute
|
||||
values (https://github.com/ansible-collections/community.general/issues/977,
|
||||
https://github.com/ansible-collections/community.general/pull/5385).
|
||||
- opentelemetry callback plugin - support opentelemetry-api 1.13.0 that removed
|
||||
support for ``_time_ns`` (https://github.com/ansible-collections/community.general/pull/5342).
|
||||
- pfexec become plugin - remove superflous quotes preventing exe wrap from working
|
||||
as expected (https://github.com/ansible-collections/community.general/issues/3671,
|
||||
https://github.com/ansible-collections/community.general/pull/3889).
|
||||
- pkgng - fix case when ``pkg`` fails when trying to upgrade all packages (https://github.com/ansible-collections/community.general/issues/5363).
|
||||
- proxmox_kvm - fix ``agent`` parameter when boolean value is specified (https://github.com/ansible-collections/community.general/pull/5198).
|
||||
- virtualbox inventory plugin - skip parsing values with keys that have both
|
||||
a value and nested data. Skip parsing values that are nested more than two
|
||||
keys deep (https://github.com/ansible-collections/community.general/issues/5332,
|
||||
https://github.com/ansible-collections/community.general/pull/5348).
|
||||
- xenserver_facts - fix broken ``AnsibleModule`` call that prevented the module
|
||||
from working at all (https://github.com/ansible-collections/community.general/pull/5383).
|
||||
deprecated_features:
|
||||
- ArgFormat module utils - deprecated along ``CmdMixin``, in favor of the ``cmd_runner_fmt``
|
||||
module util (https://github.com/ansible-collections/community.general/pull/5370).
|
||||
- CmdMixin module utils - deprecated in favor of the ``CmdRunner`` module util
|
||||
(https://github.com/ansible-collections/community.general/pull/5370).
|
||||
- CmdModuleHelper module utils - deprecated in favor of the ``CmdRunner`` module
|
||||
util (https://github.com/ansible-collections/community.general/pull/5370).
|
||||
- CmdStateModuleHelper module utils - deprecated in favor of the ``CmdRunner``
|
||||
module util (https://github.com/ansible-collections/community.general/pull/5370).
|
||||
- django_manage - support for Django releases older than 4.1 has been deprecated
|
||||
and will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5400).
|
||||
- django_manage - support for the commands ``cleanup``, ``syncdb`` and ``validate``
|
||||
that have been deprecated in Django long time ago will be removed in community.general
|
||||
9.0.0 (https://github.com/ansible-collections/community.general/pull/5400).
|
||||
- django_manage - the behavior of "creating the virtual environment when missing"
|
||||
is being deprecated and will be removed in community.general version 9.0.0
|
||||
(https://github.com/ansible-collections/community.general/pull/5405).
|
||||
- newrelic_deployment - ``appname`` and ``environment`` are no longer valid
|
||||
options in the v2 API. They will be removed in community.general 7.0.0 (https://github.com/ansible-collections/community.general/pull/5341).
|
||||
major_changes:
|
||||
- newrelic_deployment - removed New Relic v1 API, added support for v2 API (https://github.com/ansible-collections/community.general/pull/5341).
|
||||
minor_changes:
|
||||
- consul - minor refactoring (https://github.com/ansible-collections/community.general/pull/5367).
|
||||
- lxc_container - minor refactoring (https://github.com/ansible-collections/community.general/pull/5358).
|
||||
- nmcli - add ``transport_mode`` configuration for Infiniband devices (https://github.com/ansible-collections/community.general/pull/5361).
|
||||
- opentelemetry callback plugin - send logs. This can be disabled by setting
|
||||
``disable_logs=false`` (https://github.com/ansible-collections/community.general/pull/4175).
|
||||
- portage - add knobs for Portage's ``--backtrack`` and ``--with-bdeps`` options
|
||||
(https://github.com/ansible-collections/community.general/pull/5349).
|
||||
- portage - use Portage's python module instead of calling gentoolkit-provided
|
||||
program in shell (https://github.com/ansible-collections/community.general/pull/5349).
|
||||
- znode - possibility to use ZooKeeper ACL authentication (https://github.com/ansible-collections/community.general/pull/5306).
|
||||
release_summary: Regular feature and bugfix release.
|
||||
fragments:
|
||||
- 3671-illumos-pfexec.yml
|
||||
- 4175-opentelemetry_logs.yml
|
||||
- 5.8.0.yml
|
||||
- 5198-proxmox.yml
|
||||
- 5306-add-options-for-authentication.yml
|
||||
- 5341-newrelic-v2-api-changes.yml
|
||||
- 5342-opentelemetry_bug_fix_opentelemetry-api-1.13.yml
|
||||
- 5348-fix-vbox-deeply-nested-hostvars.yml
|
||||
- 5349-drop-gentoolkit-more-knobs.yml
|
||||
- 5358-lxc-container-refactor.yml
|
||||
- 5361-nmcli-add-infiniband-transport-mode.yaml
|
||||
- 5367-consul-refactor.yaml
|
||||
- 5369-pkgng-fix-update-all.yaml
|
||||
- 5370-mh-cmdmixin-deprecation.yaml
|
||||
- 5383-xenserver_facts.yml
|
||||
- 5385-search_s-based-_is_value_present.yaml
|
||||
- 5393-archive.yml
|
||||
- 5400-django-manage-deprecations.yml
|
||||
- 5404-django-manage-venv-deprecation.yml
|
||||
modules:
|
||||
- description: Add/remove/change files in ISO file
|
||||
name: iso_customize
|
||||
namespace: files
|
||||
- description: Listing of resource policy_profiles in ManageIQ
|
||||
name: manageiq_policies_info
|
||||
namespace: remote_management.manageiq
|
||||
- description: Retrieve resource tags in ManageIQ
|
||||
name: manageiq_tags_info
|
||||
namespace: remote_management.manageiq
|
||||
- description: Scaleway Container registry management module
|
||||
name: scaleway_container_registry
|
||||
namespace: cloud.scaleway
|
||||
- description: Scaleway Container registry info module
|
||||
name: scaleway_container_registry_info
|
||||
namespace: cloud.scaleway
|
||||
release_date: '2022-10-25'
|
||||
5.8.1:
|
||||
changes:
|
||||
bugfixes:
|
||||
- dependent lookup plugin - avoid warning on deprecated parameter for ``Templar.template()``
|
||||
(https://github.com/ansible-collections/community.general/pull/5543).
|
||||
- iso_create - the module somtimes failed to add folders for Joliet and UDF
|
||||
formats (https://github.com/ansible-collections/community.general/issues/5275).
|
||||
- ldap_attrs - fix bug which caused a ``Bad search filter`` error. The error
|
||||
was occuring when the ldap attribute value contained special characters such
|
||||
as ``(`` or ``*`` (https://github.com/ansible-collections/community.general/issues/5434,
|
||||
https://github.com/ansible-collections/community.general/pull/5435).
|
||||
- nmcli - fix int options idempotence (https://github.com/ansible-collections/community.general/issues/4998).
|
||||
- nsupdate - fix silent failures when updating ``NS`` entries from Bind9 managed
|
||||
DNS zones (https://github.com/ansible-collections/community.general/issues/4657).
|
||||
- one_vm - avoid splitting labels that are ``None`` (https://github.com/ansible-collections/community.general/pull/5489).
|
||||
- proxmox_disk - avoid duplicate ``vmid`` reference (https://github.com/ansible-collections/community.general/issues/5492,
|
||||
https://github.com/ansible-collections/community.general/pull/5493).
|
||||
- snap - allow values in the ``options`` parameter to contain whitespaces (https://github.com/ansible-collections/community.general/pull/5475).
|
||||
deprecated_features:
|
||||
- Please note that some tools, like the VScode plugin (https://github.com/ansible/vscode-ansible/issues/573),
|
||||
or ``ansible-doc --list --type module``, suggest to replace the correct FQCNs
|
||||
for modules and actions in community.general with internal names that have
|
||||
more than three components. For example, ``community.general.ufw`` is suggested
|
||||
to be replaced by ``community.general.system.ufw``. While these longer names
|
||||
do work, they are considered **internal names** by the collection and are
|
||||
subject to change and be removed at all time. They **will** be removed in
|
||||
community.general 6.0.0 and result in deprecation messages. Avoid using these
|
||||
internal names, and use general three-component FQCNs (``community.general.<name_of_module>``)
|
||||
instead (https://github.com/ansible-collections/community.general/pull/5373).
|
||||
minor_changes:
|
||||
- passwordstore lookup plugin - improve error messages to include stderr (https://github.com/ansible-collections/community.general/pull/5436)
|
||||
release_summary: Regular bugfix release.
|
||||
fragments:
|
||||
- 4998-nmcli-fix-int-options-idempotence.yml
|
||||
- 5.8.1.yml
|
||||
- 5377-nsupdate-ns-records-with-bind.yml
|
||||
- 5435-escape-ldap-param.yml
|
||||
- 5436-passwordstore-errors.yml
|
||||
- 5468-iso-create-not-add-folders.yml
|
||||
- 5475-snap-option-value-whitespace.yml
|
||||
- 5489-nonetype-in-get-vm-by-label.yml
|
||||
- 5493-proxmox.yml
|
||||
- 5543-dependent-template.yml
|
||||
- fqcn-warnings.yml
|
||||
release_date: '2022-11-15'
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
namespace: community
|
||||
name: general
|
||||
version: 5.7.0
|
||||
version: 5.8.1
|
||||
readme: README.md
|
||||
authors:
|
||||
- Ansible (https://github.com/ansible)
|
||||
|
||||
@@ -560,6 +560,8 @@ plugin_routing:
|
||||
redirect: community.general.files.iso_create
|
||||
iso_extract:
|
||||
redirect: community.general.files.iso_extract
|
||||
iso_customize:
|
||||
redirect: community.general.files.iso_customize
|
||||
jabber:
|
||||
redirect: community.general.notification.jabber
|
||||
java_cert:
|
||||
@@ -708,10 +710,14 @@ plugin_routing:
|
||||
redirect: community.general.remote_management.manageiq.manageiq_group
|
||||
manageiq_policies:
|
||||
redirect: community.general.remote_management.manageiq.manageiq_policies
|
||||
manageiq_policies_info:
|
||||
redirect: community.general.remote_management.manageiq.manageiq_policies_info
|
||||
manageiq_provider:
|
||||
redirect: community.general.remote_management.manageiq.manageiq_provider
|
||||
manageiq_tags:
|
||||
redirect: community.general.remote_management.manageiq.manageiq_tags
|
||||
manageiq_tags_info:
|
||||
redirect: community.general.remote_management.manageiq.manageiq_tags_info
|
||||
manageiq_tenant:
|
||||
redirect: community.general.remote_management.manageiq.manageiq_tenant
|
||||
manageiq_user:
|
||||
@@ -1373,6 +1379,10 @@ plugin_routing:
|
||||
redirect: community.general.cloud.scaleway.scaleway_compute
|
||||
scaleway_compute_private_network:
|
||||
redirect: community.general.cloud.scaleway.scaleway_compute_private_network
|
||||
scaleway_container_registry:
|
||||
redirect: community.general.cloud.scaleway.scaleway_container_registry
|
||||
scaleway_container_registry_info:
|
||||
redirect: community.general.cloud.scaleway.scaleway_container_registry_info
|
||||
scaleway_database_backup:
|
||||
redirect: community.general.cloud.scaleway.scaleway_database_backup
|
||||
scaleway_image_facts:
|
||||
|
||||
@@ -102,4 +102,4 @@ class BecomeModule(BecomeBase):
|
||||
|
||||
flags = self.get_option('become_flags')
|
||||
noexe = not self.get_option('wrap_exe')
|
||||
return '%s %s "%s"' % (exe, flags, self._build_success_command(cmd, shell, noexe=noexe))
|
||||
return '%s %s %s' % (exe, flags, self._build_success_command(cmd, shell, noexe=noexe))
|
||||
|
||||
@@ -62,6 +62,17 @@ DOCUMENTATION = '''
|
||||
- The L(W3C Trace Context header traceparent,https://www.w3.org/TR/trace-context-1/#traceparent-header).
|
||||
env:
|
||||
- name: TRACEPARENT
|
||||
disable_logs:
|
||||
default: false
|
||||
type: bool
|
||||
description:
|
||||
- Disable sending logs.
|
||||
env:
|
||||
- name: ANSIBLE_OPENTELEMETRY_DISABLE_LOGS
|
||||
ini:
|
||||
- section: callback_opentelemetry
|
||||
key: disable_logs
|
||||
version_added: 5.8.0
|
||||
requirements:
|
||||
- opentelemetry-api (Python library)
|
||||
- opentelemetry-exporter-otlp (Python library)
|
||||
@@ -110,13 +121,32 @@ try:
|
||||
from opentelemetry.sdk.trace.export import (
|
||||
BatchSpanProcessor
|
||||
)
|
||||
from opentelemetry.util._time import _time_ns
|
||||
|
||||
# Support for opentelemetry-api <= 1.12
|
||||
try:
|
||||
from opentelemetry.util._time import _time_ns
|
||||
except ImportError as imp_exc:
|
||||
OTEL_LIBRARY_TIME_NS_ERROR = imp_exc
|
||||
else:
|
||||
OTEL_LIBRARY_TIME_NS_ERROR = None
|
||||
|
||||
except ImportError as imp_exc:
|
||||
OTEL_LIBRARY_IMPORT_ERROR = imp_exc
|
||||
OTEL_LIBRARY_TIME_NS_ERROR = imp_exc
|
||||
else:
|
||||
OTEL_LIBRARY_IMPORT_ERROR = None
|
||||
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
time_ns = time.time_ns
|
||||
elif not OTEL_LIBRARY_TIME_NS_ERROR:
|
||||
time_ns = _time_ns
|
||||
else:
|
||||
def time_ns():
|
||||
# Support versions older than 3.7 with opentelemetry-api > 1.12
|
||||
return int(time.time() * 1e9)
|
||||
|
||||
|
||||
class TaskData:
|
||||
"""
|
||||
Data about an individual task.
|
||||
@@ -128,12 +158,10 @@ class TaskData:
|
||||
self.path = path
|
||||
self.play = play
|
||||
self.host_data = OrderedDict()
|
||||
if sys.version_info >= (3, 7):
|
||||
self.start = time.time_ns()
|
||||
else:
|
||||
self.start = _time_ns()
|
||||
self.start = time_ns()
|
||||
self.action = action
|
||||
self.args = args
|
||||
self.dump = None
|
||||
|
||||
def add_host(self, host):
|
||||
if host.uuid in self.host_data:
|
||||
@@ -156,10 +184,7 @@ class HostData:
|
||||
self.name = name
|
||||
self.status = status
|
||||
self.result = result
|
||||
if sys.version_info >= (3, 7):
|
||||
self.finish = time.time_ns()
|
||||
else:
|
||||
self.finish = _time_ns()
|
||||
self.finish = time_ns()
|
||||
|
||||
|
||||
class OpenTelemetrySource(object):
|
||||
@@ -199,7 +224,7 @@ class OpenTelemetrySource(object):
|
||||
|
||||
tasks_data[uuid] = TaskData(uuid, name, path, play_name, action, args)
|
||||
|
||||
def finish_task(self, tasks_data, status, result):
|
||||
def finish_task(self, tasks_data, status, result, dump):
|
||||
""" record the results of a task for a single host """
|
||||
|
||||
task_uuid = result._task._uuid
|
||||
@@ -216,9 +241,10 @@ class OpenTelemetrySource(object):
|
||||
if self.ansible_version is None and hasattr(result, '_task_fields') and result._task_fields['args'].get('_ansible_version'):
|
||||
self.ansible_version = result._task_fields['args'].get('_ansible_version')
|
||||
|
||||
task.dump = dump
|
||||
task.add_host(HostData(host_uuid, host_name, status, result))
|
||||
|
||||
def generate_distributed_traces(self, otel_service_name, ansible_playbook, tasks_data, status, traceparent):
|
||||
def generate_distributed_traces(self, otel_service_name, ansible_playbook, tasks_data, status, traceparent, disable_logs):
|
||||
""" generate distributed traces from the collected TaskData and HostData """
|
||||
|
||||
tasks = []
|
||||
@@ -254,9 +280,9 @@ class OpenTelemetrySource(object):
|
||||
for task in tasks:
|
||||
for host_uuid, host_data in task.host_data.items():
|
||||
with tracer.start_as_current_span(task.name, start_time=task.start, end_on_exit=False) as span:
|
||||
self.update_span_data(task, host_data, span)
|
||||
self.update_span_data(task, host_data, span, disable_logs)
|
||||
|
||||
def update_span_data(self, task_data, host_data, span):
|
||||
def update_span_data(self, task_data, host_data, span, disable_logs):
|
||||
""" update the span with the given TaskData and HostData """
|
||||
|
||||
name = '[%s] %s: %s' % (host_data.name, task_data.play, task_data.name)
|
||||
@@ -302,6 +328,9 @@ class OpenTelemetrySource(object):
|
||||
self.set_span_attribute(span, "ansible.task.host.status", host_data.status)
|
||||
# This will allow to enrich the service map
|
||||
self.add_attributes_for_service_map_if_possible(span, task_data)
|
||||
# Send logs
|
||||
if not disable_logs:
|
||||
span.add_event(task_data.dump)
|
||||
span.end(end_time=host_data.finish)
|
||||
|
||||
def set_span_attribute(self, span, attributeName, attributeValue):
|
||||
@@ -405,6 +434,7 @@ class CallbackModule(CallbackBase):
|
||||
def __init__(self, display=None):
|
||||
super(CallbackModule, self).__init__(display=display)
|
||||
self.hide_task_arguments = None
|
||||
self.disable_logs = None
|
||||
self.otel_service_name = None
|
||||
self.ansible_playbook = None
|
||||
self.play_name = None
|
||||
@@ -435,6 +465,8 @@ class CallbackModule(CallbackBase):
|
||||
|
||||
self.hide_task_arguments = self.get_option('hide_task_arguments')
|
||||
|
||||
self.disable_logs = self.get_option('disable_logs')
|
||||
|
||||
self.otel_service_name = self.get_option('otel_service_name')
|
||||
|
||||
if not self.otel_service_name:
|
||||
@@ -491,28 +523,32 @@ class CallbackModule(CallbackBase):
|
||||
self.opentelemetry.finish_task(
|
||||
self.tasks_data,
|
||||
status,
|
||||
result
|
||||
result,
|
||||
self._dump_results(result._result)
|
||||
)
|
||||
|
||||
def v2_runner_on_ok(self, result):
|
||||
self.opentelemetry.finish_task(
|
||||
self.tasks_data,
|
||||
'ok',
|
||||
result
|
||||
result,
|
||||
self._dump_results(result._result)
|
||||
)
|
||||
|
||||
def v2_runner_on_skipped(self, result):
|
||||
self.opentelemetry.finish_task(
|
||||
self.tasks_data,
|
||||
'skipped',
|
||||
result
|
||||
result,
|
||||
self._dump_results(result._result)
|
||||
)
|
||||
|
||||
def v2_playbook_on_include(self, included_file):
|
||||
self.opentelemetry.finish_task(
|
||||
self.tasks_data,
|
||||
'included',
|
||||
included_file
|
||||
included_file,
|
||||
""
|
||||
)
|
||||
|
||||
def v2_playbook_on_stats(self, stats):
|
||||
@@ -525,7 +561,8 @@ class CallbackModule(CallbackBase):
|
||||
self.ansible_playbook,
|
||||
self.tasks_data,
|
||||
status,
|
||||
self.traceparent
|
||||
self.traceparent,
|
||||
self.disable_logs
|
||||
)
|
||||
|
||||
def v2_runner_on_async_failed(self, result, **kwargs):
|
||||
|
||||
@@ -43,6 +43,7 @@ options:
|
||||
- The path on which InfluxDB server is accessible
|
||||
- Only available when using python-influxdb >= 5.1.0
|
||||
type: str
|
||||
default: ''
|
||||
version_added: '0.2.0'
|
||||
validate_certs:
|
||||
description:
|
||||
@@ -80,4 +81,5 @@ options:
|
||||
description:
|
||||
- HTTP(S) proxy to use for Requests to connect to InfluxDB server.
|
||||
type: dict
|
||||
default: {}
|
||||
'''
|
||||
|
||||
@@ -23,6 +23,7 @@ options:
|
||||
description:
|
||||
- The password to use with I(bind_dn).
|
||||
type: str
|
||||
default: ''
|
||||
dn:
|
||||
required: true
|
||||
description:
|
||||
|
||||
33
plugins/doc_fragments/scaleway_waitable_resource.py
Normal file
33
plugins/doc_fragments/scaleway_waitable_resource.py
Normal file
@@ -0,0 +1,33 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright (c) 2022, Guillaume MARTINEZ <lunik@tiwabbit.fr>
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
# Standard documentation fragment
|
||||
DOCUMENTATION = r'''
|
||||
options:
|
||||
wait:
|
||||
description:
|
||||
- Wait for the resource to reach its desired state before returning.
|
||||
type: bool
|
||||
default: true
|
||||
wait_timeout:
|
||||
type: int
|
||||
description:
|
||||
- Time to wait for the resource to reach the expected state.
|
||||
required: false
|
||||
default: 300
|
||||
wait_sleep_time:
|
||||
type: int
|
||||
description:
|
||||
- Time to wait before every attempt to check the state of the resource.
|
||||
required: false
|
||||
default: 3
|
||||
'''
|
||||
@@ -17,6 +17,7 @@ options:
|
||||
- Is needed for some modules
|
||||
type: dict
|
||||
required: false
|
||||
default: {}
|
||||
utm_host:
|
||||
description:
|
||||
- The REST Endpoint of the Sophos UTM.
|
||||
|
||||
@@ -26,6 +26,7 @@ DOCUMENTATION = '''
|
||||
description:
|
||||
- The correct parser for the input data.
|
||||
- For example C(ifconfig).
|
||||
- "Note: use underscores instead of dashes (if any) in the parser module name."
|
||||
- See U(https://github.com/kellyjonbrazil/jc#parsers) for the latest list of parsers.
|
||||
type: string
|
||||
required: true
|
||||
@@ -38,10 +39,16 @@ DOCUMENTATION = '''
|
||||
type: boolean
|
||||
default: false
|
||||
requirements:
|
||||
- jc (https://github.com/kellyjonbrazil/jc)
|
||||
- jc installed as a Python library (U(https://pypi.org/project/jc/))
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- name: Install the prereqs of the jc filter (jc Python package) on the Ansible controller
|
||||
delegate_to: localhost
|
||||
ansible.builtin.pip:
|
||||
name: jc
|
||||
state: present
|
||||
|
||||
- name: Run command
|
||||
ansible.builtin.command: uname -a
|
||||
register: result
|
||||
@@ -94,15 +101,19 @@ def jc(data, parser, quiet=True, raw=False):
|
||||
dictionary or list of dictionaries
|
||||
|
||||
Example:
|
||||
|
||||
- name: run date command
|
||||
hosts: ubuntu
|
||||
tasks:
|
||||
- shell: date
|
||||
- name: install the prereqs of the jc filter (jc Python package) on the Ansible controller
|
||||
delegate_to: localhost
|
||||
ansible.builtin.pip:
|
||||
name: jc
|
||||
state: present
|
||||
- ansible.builtin.shell: date
|
||||
register: result
|
||||
- set_fact:
|
||||
- ansible.builtin.set_fact:
|
||||
myvar: "{{ result.stdout | community.general.jc('date') }}"
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ myvar }}"
|
||||
|
||||
produces:
|
||||
@@ -124,7 +135,7 @@ def jc(data, parser, quiet=True, raw=False):
|
||||
"""
|
||||
|
||||
if not HAS_LIB:
|
||||
raise AnsibleError('You need to install "jc" prior to running jc filter')
|
||||
raise AnsibleError('You need to install "jc" as a Python library on the Ansible controller prior to running jc filter')
|
||||
|
||||
try:
|
||||
jc_parser = importlib.import_module('jc.parsers.' + parser)
|
||||
|
||||
@@ -186,10 +186,13 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
||||
else:
|
||||
# found vars, accumulate in hostvars for clean inventory set
|
||||
pref_k = 'vbox_' + k.strip().replace(' ', '_')
|
||||
if k.startswith(' '):
|
||||
if prevkey not in hostvars[current_host]:
|
||||
leading_spaces = len(k) - len(k.lstrip(' '))
|
||||
if 0 < leading_spaces <= 2:
|
||||
if prevkey not in hostvars[current_host] or not isinstance(hostvars[current_host][prevkey], dict):
|
||||
hostvars[current_host][prevkey] = {}
|
||||
hostvars[current_host][prevkey][pref_k] = v
|
||||
elif leading_spaces > 2:
|
||||
continue
|
||||
else:
|
||||
if v != '':
|
||||
hostvars[current_host][pref_k] = v
|
||||
|
||||
@@ -125,8 +125,16 @@ from ansible.errors import AnsibleLookupError
|
||||
from ansible.module_utils.common._collections_compat import Mapping, Sequence
|
||||
from ansible.module_utils.six import string_types
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.release import __version__ as ansible_version
|
||||
from ansible.template import Templar
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.version import LooseVersion
|
||||
|
||||
|
||||
# Whether Templar has a cache, which can be controlled by Templar.template()'s cache option.
|
||||
# The cache was removed for ansible-core 2.14 (https://github.com/ansible/ansible/pull/78419)
|
||||
_TEMPLAR_HAS_TEMPLATE_CACHE = LooseVersion(ansible_version) < LooseVersion('2.14.0')
|
||||
|
||||
|
||||
class LookupModule(LookupBase):
|
||||
def __evaluate(self, expression, templar, variables):
|
||||
@@ -136,7 +144,10 @@ class LookupModule(LookupBase):
|
||||
``variables`` are the variables to use.
|
||||
"""
|
||||
templar.available_variables = variables or {}
|
||||
return templar.template("{0}{1}{2}".format("{{", expression, "}}"), cache=False)
|
||||
expression = "{0}{1}{2}".format("{{", expression, "}}")
|
||||
if _TEMPLAR_HAS_TEMPLATE_CACHE:
|
||||
return templar.template(expression, cache=False)
|
||||
return templar.template(expression)
|
||||
|
||||
def __process(self, result, terms, index, current, templar, variables):
|
||||
"""Fills ``result`` list with evaluated items.
|
||||
|
||||
@@ -268,7 +268,7 @@ class LookupModule(LookupBase):
|
||||
)
|
||||
self.realpass = 'pass: the standard unix password manager' in passoutput
|
||||
except (subprocess.CalledProcessError) as e:
|
||||
raise AnsibleError(e)
|
||||
raise AnsibleError('exit code {0} while running {1}. Error output: {2}'.format(e.returncode, e.cmd, e.output))
|
||||
|
||||
return self.realpass
|
||||
|
||||
@@ -354,7 +354,7 @@ class LookupModule(LookupBase):
|
||||
except (subprocess.CalledProcessError) as e:
|
||||
# 'not in password store' is the expected error if a password wasn't found
|
||||
if 'not in the password store' not in e.output:
|
||||
raise AnsibleError(e)
|
||||
raise AnsibleError('exit code {0} while running {1}. Error output: {2}'.format(e.returncode, e.cmd, e.output))
|
||||
|
||||
if self.paramvals['missing'] == 'error':
|
||||
raise AnsibleError('passwordstore: passname {0} not found and missing=error is set'.format(self.passname))
|
||||
@@ -387,7 +387,7 @@ class LookupModule(LookupBase):
|
||||
try:
|
||||
check_output2([self.pass_cmd, 'insert', '-f', '-m', self.passname], input=msg, env=self.env)
|
||||
except (subprocess.CalledProcessError) as e:
|
||||
raise AnsibleError(e)
|
||||
raise AnsibleError('exit code {0} while running {1}. Error output: {2}'.format(e.returncode, e.cmd, e.output))
|
||||
return newpass
|
||||
|
||||
def generate_password(self):
|
||||
@@ -399,7 +399,7 @@ class LookupModule(LookupBase):
|
||||
try:
|
||||
check_output2([self.pass_cmd, 'insert', '-f', '-m', self.passname], input=msg, env=self.env)
|
||||
except (subprocess.CalledProcessError) as e:
|
||||
raise AnsibleError(e)
|
||||
raise AnsibleError('exit code {0} while running {1}. Error output: {2}'.format(e.returncode, e.cmd, e.output))
|
||||
return newpass
|
||||
|
||||
def get_passresult(self):
|
||||
|
||||
@@ -156,3 +156,315 @@ class ManageIQ(object):
|
||||
msg = "{collection_name} where {params} does not exist in manageiq".format(
|
||||
collection_name=collection_name, params=str(params))
|
||||
self.module.fail_json(msg=msg)
|
||||
|
||||
def policies(self, resource_id, resource_type, resource_name):
|
||||
manageiq = ManageIQ(self.module)
|
||||
|
||||
# query resource id, fail if resource does not exist
|
||||
if resource_id is None:
|
||||
resource_id = manageiq.find_collection_resource_or_fail(resource_type, name=resource_name)['id']
|
||||
|
||||
return ManageIQPolicies(manageiq, resource_type, resource_id)
|
||||
|
||||
def query_resource_id(self, resource_type, resource_name):
|
||||
""" Query the resource name in ManageIQ.
|
||||
|
||||
Returns:
|
||||
the resource ID if it exists in ManageIQ, Fail otherwise.
|
||||
"""
|
||||
resource = self.find_collection_resource_by(resource_type, name=resource_name)
|
||||
if resource:
|
||||
return resource["id"]
|
||||
else:
|
||||
msg = "{resource_name} {resource_type} does not exist in manageiq".format(
|
||||
resource_name=resource_name, resource_type=resource_type)
|
||||
self.module.fail_json(msg=msg)
|
||||
|
||||
|
||||
class ManageIQPolicies(object):
|
||||
"""
|
||||
Object to execute policies management operations of manageiq resources.
|
||||
"""
|
||||
|
||||
def __init__(self, manageiq, resource_type, resource_id):
|
||||
self.manageiq = manageiq
|
||||
|
||||
self.module = self.manageiq.module
|
||||
self.api_url = self.manageiq.api_url
|
||||
self.client = self.manageiq.client
|
||||
|
||||
self.resource_type = resource_type
|
||||
self.resource_id = resource_id
|
||||
self.resource_url = '{api_url}/{resource_type}/{resource_id}'.format(
|
||||
api_url=self.api_url,
|
||||
resource_type=resource_type,
|
||||
resource_id=resource_id)
|
||||
|
||||
def query_profile_href(self, profile):
|
||||
""" Add or Update the policy_profile href field
|
||||
|
||||
Example:
|
||||
{name: STR, ...} => {name: STR, href: STR}
|
||||
"""
|
||||
resource = self.manageiq.find_collection_resource_or_fail(
|
||||
"policy_profiles", **profile)
|
||||
return dict(name=profile['name'], href=resource['href'])
|
||||
|
||||
def query_resource_profiles(self):
|
||||
""" Returns a set of the profile objects objects assigned to the resource
|
||||
"""
|
||||
url = '{resource_url}/policy_profiles?expand=resources'
|
||||
try:
|
||||
response = self.client.get(url.format(resource_url=self.resource_url))
|
||||
except Exception as e:
|
||||
msg = "Failed to query {resource_type} policies: {error}".format(
|
||||
resource_type=self.resource_type,
|
||||
error=e)
|
||||
self.module.fail_json(msg=msg)
|
||||
|
||||
resources = response.get('resources', [])
|
||||
|
||||
# clean the returned rest api profile object to look like:
|
||||
# {profile_name: STR, profile_description: STR, policies: ARR<POLICIES>}
|
||||
profiles = [self.clean_profile_object(profile) for profile in resources]
|
||||
|
||||
return profiles
|
||||
|
||||
def query_profile_policies(self, profile_id):
|
||||
""" Returns a set of the policy objects assigned to the resource
|
||||
"""
|
||||
url = '{api_url}/policy_profiles/{profile_id}?expand=policies'
|
||||
try:
|
||||
response = self.client.get(url.format(api_url=self.api_url, profile_id=profile_id))
|
||||
except Exception as e:
|
||||
msg = "Failed to query {resource_type} policies: {error}".format(
|
||||
resource_type=self.resource_type,
|
||||
error=e)
|
||||
self.module.fail_json(msg=msg)
|
||||
|
||||
resources = response.get('policies', [])
|
||||
|
||||
# clean the returned rest api policy object to look like:
|
||||
# {name: STR, description: STR, active: BOOL}
|
||||
policies = [self.clean_policy_object(policy) for policy in resources]
|
||||
|
||||
return policies
|
||||
|
||||
def clean_policy_object(self, policy):
|
||||
""" Clean a policy object to have human readable form of:
|
||||
{
|
||||
name: STR,
|
||||
description: STR,
|
||||
active: BOOL
|
||||
}
|
||||
"""
|
||||
name = policy.get('name')
|
||||
description = policy.get('description')
|
||||
active = policy.get('active')
|
||||
|
||||
return dict(
|
||||
name=name,
|
||||
description=description,
|
||||
active=active)
|
||||
|
||||
def clean_profile_object(self, profile):
|
||||
""" Clean a profile object to have human readable form of:
|
||||
{
|
||||
profile_name: STR,
|
||||
profile_description: STR,
|
||||
policies: ARR<POLICIES>
|
||||
}
|
||||
"""
|
||||
profile_id = profile['id']
|
||||
name = profile.get('name')
|
||||
description = profile.get('description')
|
||||
policies = self.query_profile_policies(profile_id)
|
||||
|
||||
return dict(
|
||||
profile_name=name,
|
||||
profile_description=description,
|
||||
policies=policies)
|
||||
|
||||
def profiles_to_update(self, profiles, action):
|
||||
""" Create a list of policies we need to update in ManageIQ.
|
||||
|
||||
Returns:
|
||||
Whether or not a change took place and a message describing the
|
||||
operation executed.
|
||||
"""
|
||||
profiles_to_post = []
|
||||
assigned_profiles = self.query_resource_profiles()
|
||||
|
||||
# make a list of assigned full profile names strings
|
||||
# e.g. ['openscap profile', ...]
|
||||
assigned_profiles_set = set([profile['profile_name'] for profile in assigned_profiles])
|
||||
|
||||
for profile in profiles:
|
||||
assigned = profile.get('name') in assigned_profiles_set
|
||||
|
||||
if (action == 'unassign' and assigned) or (action == 'assign' and not assigned):
|
||||
# add/update the policy profile href field
|
||||
# {name: STR, ...} => {name: STR, href: STR}
|
||||
profile = self.query_profile_href(profile)
|
||||
profiles_to_post.append(profile)
|
||||
|
||||
return profiles_to_post
|
||||
|
||||
def assign_or_unassign_profiles(self, profiles, action):
|
||||
""" Perform assign/unassign action
|
||||
"""
|
||||
# get a list of profiles needed to be changed
|
||||
profiles_to_post = self.profiles_to_update(profiles, action)
|
||||
if not profiles_to_post:
|
||||
return dict(
|
||||
changed=False,
|
||||
msg="Profiles {profiles} already {action}ed, nothing to do".format(
|
||||
action=action,
|
||||
profiles=profiles))
|
||||
|
||||
# try to assign or unassign profiles to resource
|
||||
url = '{resource_url}/policy_profiles'.format(resource_url=self.resource_url)
|
||||
try:
|
||||
response = self.client.post(url, action=action, resources=profiles_to_post)
|
||||
except Exception as e:
|
||||
msg = "Failed to {action} profile: {error}".format(
|
||||
action=action,
|
||||
error=e)
|
||||
self.module.fail_json(msg=msg)
|
||||
|
||||
# check all entities in result to be successful
|
||||
for result in response['results']:
|
||||
if not result['success']:
|
||||
msg = "Failed to {action}: {message}".format(
|
||||
action=action,
|
||||
message=result['message'])
|
||||
self.module.fail_json(msg=msg)
|
||||
|
||||
# successfully changed all needed profiles
|
||||
return dict(
|
||||
changed=True,
|
||||
msg="Successfully {action}ed profiles: {profiles}".format(
|
||||
action=action,
|
||||
profiles=profiles))
|
||||
|
||||
|
||||
class ManageIQTags(object):
|
||||
"""
|
||||
Object to execute tags management operations of manageiq resources.
|
||||
"""
|
||||
|
||||
def __init__(self, manageiq, resource_type, resource_id):
|
||||
self.manageiq = manageiq
|
||||
|
||||
self.module = self.manageiq.module
|
||||
self.api_url = self.manageiq.api_url
|
||||
self.client = self.manageiq.client
|
||||
|
||||
self.resource_type = resource_type
|
||||
self.resource_id = resource_id
|
||||
self.resource_url = '{api_url}/{resource_type}/{resource_id}'.format(
|
||||
api_url=self.api_url,
|
||||
resource_type=resource_type,
|
||||
resource_id=resource_id)
|
||||
|
||||
def full_tag_name(self, tag):
|
||||
""" Returns the full tag name in manageiq
|
||||
"""
|
||||
return '/managed/{tag_category}/{tag_name}'.format(
|
||||
tag_category=tag['category'],
|
||||
tag_name=tag['name'])
|
||||
|
||||
def clean_tag_object(self, tag):
|
||||
""" Clean a tag object to have human readable form of:
|
||||
{
|
||||
full_name: STR,
|
||||
name: STR,
|
||||
display_name: STR,
|
||||
category: STR
|
||||
}
|
||||
"""
|
||||
full_name = tag.get('name')
|
||||
categorization = tag.get('categorization', {})
|
||||
|
||||
return dict(
|
||||
full_name=full_name,
|
||||
name=categorization.get('name'),
|
||||
display_name=categorization.get('display_name'),
|
||||
category=categorization.get('category', {}).get('name'))
|
||||
|
||||
def query_resource_tags(self):
|
||||
""" Returns a set of the tag objects assigned to the resource
|
||||
"""
|
||||
url = '{resource_url}/tags?expand=resources&attributes=categorization'
|
||||
try:
|
||||
response = self.client.get(url.format(resource_url=self.resource_url))
|
||||
except Exception as e:
|
||||
msg = "Failed to query {resource_type} tags: {error}".format(
|
||||
resource_type=self.resource_type,
|
||||
error=e)
|
||||
self.module.fail_json(msg=msg)
|
||||
|
||||
resources = response.get('resources', [])
|
||||
|
||||
# clean the returned rest api tag object to look like:
|
||||
# {full_name: STR, name: STR, display_name: STR, category: STR}
|
||||
tags = [self.clean_tag_object(tag) for tag in resources]
|
||||
|
||||
return tags
|
||||
|
||||
def tags_to_update(self, tags, action):
|
||||
""" Create a list of tags we need to update in ManageIQ.
|
||||
|
||||
Returns:
|
||||
Whether or not a change took place and a message describing the
|
||||
operation executed.
|
||||
"""
|
||||
tags_to_post = []
|
||||
assigned_tags = self.query_resource_tags()
|
||||
|
||||
# make a list of assigned full tag names strings
|
||||
# e.g. ['/managed/environment/prod', ...]
|
||||
assigned_tags_set = set([tag['full_name'] for tag in assigned_tags])
|
||||
|
||||
for tag in tags:
|
||||
assigned = self.full_tag_name(tag) in assigned_tags_set
|
||||
|
||||
if assigned and action == 'unassign':
|
||||
tags_to_post.append(tag)
|
||||
elif (not assigned) and action == 'assign':
|
||||
tags_to_post.append(tag)
|
||||
|
||||
return tags_to_post
|
||||
|
||||
def assign_or_unassign_tags(self, tags, action):
|
||||
""" Perform assign/unassign action
|
||||
"""
|
||||
# get a list of tags needed to be changed
|
||||
tags_to_post = self.tags_to_update(tags, action)
|
||||
if not tags_to_post:
|
||||
return dict(
|
||||
changed=False,
|
||||
msg="Tags already {action}ed, nothing to do".format(action=action))
|
||||
|
||||
# try to assign or unassign tags to resource
|
||||
url = '{resource_url}/tags'.format(resource_url=self.resource_url)
|
||||
try:
|
||||
response = self.client.post(url, action=action, resources=tags)
|
||||
except Exception as e:
|
||||
msg = "Failed to {action} tag: {error}".format(
|
||||
action=action,
|
||||
error=e)
|
||||
self.module.fail_json(msg=msg)
|
||||
|
||||
# check all entities in result to be successful
|
||||
for result in response['results']:
|
||||
if not result['success']:
|
||||
msg = "Failed to {action}: {message}".format(
|
||||
action=action,
|
||||
message=result['message'])
|
||||
self.module.fail_json(msg=msg)
|
||||
|
||||
# successfully changed all needed tags
|
||||
return dict(
|
||||
changed=True,
|
||||
msg="Successfully {action}ed tags".format(action=action))
|
||||
|
||||
@@ -34,6 +34,10 @@ class ArgFormat(object):
|
||||
|
||||
def __init__(self, name, fmt=None, style=FORMAT, stars=0):
|
||||
"""
|
||||
THIS CLASS IS BEING DEPRECATED.
|
||||
It was never meant to be used outside the scope of CmdMixin, and CmdMixin is being deprecated.
|
||||
See the deprecation notice in ``CmdMixin.__init__()`` below.
|
||||
|
||||
Creates a CLI-formatter for one specific argument. The argument may be a module parameter or just a named parameter for
|
||||
the CLI command execution.
|
||||
:param name: Name of the argument to be formatted
|
||||
@@ -88,6 +92,9 @@ class ArgFormat(object):
|
||||
|
||||
class CmdMixin(object):
|
||||
"""
|
||||
THIS CLASS IS BEING DEPRECATED.
|
||||
See the deprecation notice in ``CmdMixin.__init__()`` below.
|
||||
|
||||
Mixin for mapping module options to running a CLI command with its arguments.
|
||||
"""
|
||||
command = None
|
||||
@@ -110,6 +117,15 @@ class CmdMixin(object):
|
||||
result[param] = ArgFormat(param, **fmt_spec)
|
||||
return result
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(CmdMixin, self).__init__(*args, **kwargs)
|
||||
self.module.deprecate(
|
||||
'The CmdMixin used in classes CmdModuleHelper and CmdStateModuleHelper is being deprecated. '
|
||||
'Modules should use community.general.plugins.module_utils.cmd_runner.CmdRunner instead.',
|
||||
version='8.0.0',
|
||||
collection_name='community.general',
|
||||
)
|
||||
|
||||
def _calculate_args(self, extra_params=None, params=None):
|
||||
def add_arg_formatted_param(_cmd_args, arg_format, _value):
|
||||
args = list(arg_format.to_text(_value))
|
||||
|
||||
@@ -84,8 +84,16 @@ class StateModuleHelper(StateMixin, ModuleHelper):
|
||||
|
||||
|
||||
class CmdModuleHelper(CmdMixin, ModuleHelper):
|
||||
"""
|
||||
THIS CLASS IS BEING DEPRECATED.
|
||||
See the deprecation notice in ``CmdMixin.__init__()``.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class CmdStateModuleHelper(CmdMixin, StateMixin, ModuleHelper):
|
||||
"""
|
||||
THIS CLASS IS BEING DEPRECATED.
|
||||
See the deprecation notice in ``CmdMixin.__init__()``.
|
||||
"""
|
||||
pass
|
||||
|
||||
@@ -9,6 +9,8 @@ __metaclass__ = type
|
||||
import json
|
||||
import re
|
||||
import sys
|
||||
import datetime
|
||||
import time
|
||||
|
||||
from ansible.module_utils.basic import env_fallback
|
||||
from ansible.module_utils.urls import fetch_url
|
||||
@@ -26,6 +28,14 @@ def scaleway_argument_spec():
|
||||
)
|
||||
|
||||
|
||||
def scaleway_waitable_resource_argument_spec():
|
||||
return dict(
|
||||
wait=dict(type="bool", default=True),
|
||||
wait_timeout=dict(type="int", default=300),
|
||||
wait_sleep_time=dict(type="int", default=3),
|
||||
)
|
||||
|
||||
|
||||
def payload_from_object(scw_object):
|
||||
return dict(
|
||||
(k, v)
|
||||
@@ -63,6 +73,25 @@ def parse_pagination_link(header):
|
||||
return parsed_relations
|
||||
|
||||
|
||||
def filter_sensitive_attributes(container, attributes):
|
||||
for attr in attributes:
|
||||
container[attr] = "SENSITIVE_VALUE"
|
||||
|
||||
return container
|
||||
|
||||
|
||||
def resource_attributes_should_be_changed(target, wished, verifiable_mutable_attributes, mutable_attributes):
|
||||
diff = dict()
|
||||
for attr in verifiable_mutable_attributes:
|
||||
if wished[attr] is not None and target[attr] != wished[attr]:
|
||||
diff[attr] = wished[attr]
|
||||
|
||||
if diff:
|
||||
return dict((attr, wished[attr]) for attr in mutable_attributes)
|
||||
else:
|
||||
return diff
|
||||
|
||||
|
||||
class Response(object):
|
||||
|
||||
def __init__(self, resp, info):
|
||||
@@ -169,6 +198,78 @@ class Scaleway(object):
|
||||
def warn(self, x):
|
||||
self.module.warn(str(x))
|
||||
|
||||
def fetch_state(self, resource):
|
||||
self.module.debug("fetch_state of resource: %s" % resource["id"])
|
||||
response = self.get(path=self.api_path + "/%s" % resource["id"])
|
||||
|
||||
if response.status_code == 404:
|
||||
return "absent"
|
||||
|
||||
if not response.ok:
|
||||
msg = 'Error during state fetching: (%s) %s' % (response.status_code, response.json)
|
||||
self.module.fail_json(msg=msg)
|
||||
|
||||
try:
|
||||
self.module.debug("Resource %s in state: %s" % (resource["id"], response.json["status"]))
|
||||
return response.json["status"]
|
||||
except KeyError:
|
||||
self.module.fail_json(msg="Could not fetch state in %s" % response.json)
|
||||
|
||||
def fetch_paginated_resources(self, resource_key, **pagination_kwargs):
|
||||
response = self.get(
|
||||
path=self.api_path,
|
||||
params=pagination_kwargs)
|
||||
|
||||
status_code = response.status_code
|
||||
if not response.ok:
|
||||
self.module.fail_json(msg='Error getting {0} [{1}: {2}]'.format(
|
||||
resource_key,
|
||||
response.status_code, response.json['message']))
|
||||
|
||||
return response.json[resource_key]
|
||||
|
||||
def fetch_all_resources(self, resource_key, **pagination_kwargs):
|
||||
resources = []
|
||||
|
||||
result = [None]
|
||||
while len(result) != 0:
|
||||
result = self.fetch_paginated_resources(resource_key, **pagination_kwargs)
|
||||
resources += result
|
||||
if 'page' in pagination_kwargs:
|
||||
pagination_kwargs['page'] += 1
|
||||
else:
|
||||
pagination_kwargs['page'] = 2
|
||||
|
||||
return resources
|
||||
|
||||
def wait_to_complete_state_transition(self, resource, stable_states, force_wait=False):
|
||||
wait = self.module.params["wait"]
|
||||
|
||||
if not (wait or force_wait):
|
||||
return
|
||||
|
||||
wait_timeout = self.module.params["wait_timeout"]
|
||||
wait_sleep_time = self.module.params["wait_sleep_time"]
|
||||
|
||||
# Prevent requesting the ressource status too soon
|
||||
time.sleep(wait_sleep_time)
|
||||
|
||||
start = datetime.datetime.utcnow()
|
||||
end = start + datetime.timedelta(seconds=wait_timeout)
|
||||
|
||||
while datetime.datetime.utcnow() < end:
|
||||
self.module.debug("We are going to wait for the resource to finish its transition")
|
||||
|
||||
state = self.fetch_state(resource)
|
||||
if state in stable_states:
|
||||
self.module.debug("It seems that the resource is not in transition anymore.")
|
||||
self.module.debug("load-balancer in state: %s" % self.fetch_state(resource))
|
||||
break
|
||||
|
||||
time.sleep(wait_sleep_time)
|
||||
else:
|
||||
self.module.fail_json(msg="Server takes too long to finish its transition")
|
||||
|
||||
|
||||
SCALEWAY_LOCATION = {
|
||||
'par1': {
|
||||
|
||||
@@ -27,7 +27,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: ali_instance
|
||||
short_description: Create, Start, Stop, Restart or Terminate an Instance in ECS. Add or Remove Instance to/from a Security Group.
|
||||
short_description: Create, Start, Stop, Restart or Terminate an Instance in ECS; Add or Remove Instance to/from a Security Group
|
||||
description:
|
||||
- Create, start, stop, restart, modify or terminate ecs instances.
|
||||
- Add or remove ecs instances to/from security group.
|
||||
|
||||
@@ -27,7 +27,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: ali_instance_info
|
||||
short_description: Gather information on instances of Alibaba Cloud ECS.
|
||||
short_description: Gather information on instances of Alibaba Cloud ECS
|
||||
description:
|
||||
- This module fetches data from the Open API in Alicloud.
|
||||
The module must be called from within the ECS instance itself.
|
||||
|
||||
@@ -61,6 +61,7 @@ options:
|
||||
- The values specified here will be used at installation time as --set arguments for atomic install.
|
||||
type: list
|
||||
elements: str
|
||||
default: []
|
||||
'''
|
||||
|
||||
EXAMPLES = r'''
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: clc_aa_policy
|
||||
short_description: Create or Delete Anti Affinity Policies at CenturyLink Cloud.
|
||||
short_description: Create or Delete Anti Affinity Policies at CenturyLink Cloud
|
||||
description:
|
||||
- An Ansible module to Create or Delete Anti Affinity Policies at CenturyLink Cloud.
|
||||
options:
|
||||
|
||||
@@ -12,7 +12,7 @@ __metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: clc_alert_policy
|
||||
short_description: Create or Delete Alert Policies at CenturyLink Cloud.
|
||||
short_description: Create or Delete Alert Policies at CenturyLink Cloud
|
||||
description:
|
||||
- An Ansible module to Create or Delete Alert Policies at CenturyLink Cloud.
|
||||
options:
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: clc_blueprint_package
|
||||
short_description: deploys a blue print package on a set of servers in CenturyLink Cloud.
|
||||
short_description: Deploys a blue print package on a set of servers in CenturyLink Cloud
|
||||
description:
|
||||
- An Ansible module to deploy blue print package on a set of servers in CenturyLink Cloud.
|
||||
options:
|
||||
|
||||
@@ -12,7 +12,7 @@ __metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: clc_loadbalancer
|
||||
short_description: Create, Delete shared loadbalancers in CenturyLink Cloud.
|
||||
short_description: Create, Delete shared loadbalancers in CenturyLink Cloud
|
||||
description:
|
||||
- An Ansible module to Create, Delete shared loadbalancers in CenturyLink Cloud.
|
||||
options:
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: clc_modify_server
|
||||
short_description: modify servers in CenturyLink Cloud.
|
||||
short_description: Modify servers in CenturyLink Cloud
|
||||
description:
|
||||
- An Ansible module to modify servers in CenturyLink Cloud.
|
||||
options:
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: clc_publicip
|
||||
short_description: Add and Delete public ips on servers in CenturyLink Cloud.
|
||||
short_description: Add and Delete public ips on servers in CenturyLink Cloud
|
||||
description:
|
||||
- An Ansible module to add or delete public ip addresses on an existing server or servers in CenturyLink Cloud.
|
||||
options:
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: clc_server
|
||||
short_description: Create, Delete, Start and Stop servers in CenturyLink Cloud.
|
||||
short_description: Create, Delete, Start and Stop servers in CenturyLink Cloud
|
||||
description:
|
||||
- An Ansible module to Create, Delete, Start and Stop servers in CenturyLink Cloud.
|
||||
options:
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: clc_server_snapshot
|
||||
short_description: Create, Delete and Restore server snapshots in CenturyLink Cloud.
|
||||
short_description: Create, Delete and Restore server snapshots in CenturyLink Cloud
|
||||
description:
|
||||
- An Ansible module to Create, Delete and Restore server snapshots in CenturyLink Cloud.
|
||||
options:
|
||||
|
||||
@@ -13,7 +13,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: dimensiondata_vlan
|
||||
short_description: Manage a VLAN in a Cloud Control network domain.
|
||||
short_description: Manage a VLAN in a Cloud Control network domain
|
||||
extends_documentation_fragment:
|
||||
- community.general.dimensiondata
|
||||
- community.general.dimensiondata_wait
|
||||
@@ -31,6 +31,7 @@ options:
|
||||
description:
|
||||
- A description of the VLAN.
|
||||
type: str
|
||||
default: ''
|
||||
network_domain:
|
||||
description:
|
||||
- The Id or name of the target network domain.
|
||||
@@ -40,11 +41,13 @@ options:
|
||||
description:
|
||||
- The base address for the VLAN's IPv4 network (e.g. 192.168.1.0).
|
||||
type: str
|
||||
default: ''
|
||||
private_ipv4_prefix_size:
|
||||
description:
|
||||
- The size of the IPv4 address space, e.g 24.
|
||||
- Required, if C(private_ipv4_base_address) is specified.
|
||||
type: int
|
||||
default: 0
|
||||
state:
|
||||
description:
|
||||
- The desired state for the target VLAN.
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: heroku_collaborator
|
||||
short_description: "Add or delete app collaborators on Heroku"
|
||||
short_description: Add or delete app collaborators on Heroku
|
||||
description:
|
||||
- Manages collaborators for Heroku apps.
|
||||
- If set to C(present) and heroku user is already collaborator, then do nothing.
|
||||
|
||||
@@ -33,6 +33,7 @@ options:
|
||||
description:
|
||||
- The timeouts for each operations.
|
||||
type: dict
|
||||
default: {}
|
||||
suboptions:
|
||||
create:
|
||||
description:
|
||||
|
||||
@@ -33,6 +33,7 @@ options:
|
||||
description:
|
||||
- The timeouts for each operations.
|
||||
type: dict
|
||||
default: {}
|
||||
suboptions:
|
||||
create:
|
||||
description:
|
||||
|
||||
@@ -33,6 +33,7 @@ options:
|
||||
description:
|
||||
- The timeouts for each operations.
|
||||
type: dict
|
||||
default: {}
|
||||
suboptions:
|
||||
create:
|
||||
description:
|
||||
|
||||
@@ -33,6 +33,7 @@ options:
|
||||
description:
|
||||
- The timeouts for each operations.
|
||||
type: dict
|
||||
default: {}
|
||||
suboptions:
|
||||
create:
|
||||
description:
|
||||
|
||||
@@ -34,6 +34,7 @@ options:
|
||||
description:
|
||||
- The timeouts for each operations.
|
||||
type: dict
|
||||
default: {}
|
||||
suboptions:
|
||||
create:
|
||||
description:
|
||||
|
||||
@@ -33,6 +33,7 @@ options:
|
||||
description:
|
||||
- The timeouts for each operations.
|
||||
type: dict
|
||||
default: {}
|
||||
suboptions:
|
||||
create:
|
||||
description:
|
||||
|
||||
@@ -33,6 +33,7 @@ options:
|
||||
description:
|
||||
- The timeouts for each operations.
|
||||
type: dict
|
||||
default: {}
|
||||
suboptions:
|
||||
create:
|
||||
description:
|
||||
|
||||
@@ -37,6 +37,7 @@ options:
|
||||
description:
|
||||
- Add the instance to a Display Group in Linode Manager.
|
||||
type: str
|
||||
default: ''
|
||||
linode_id:
|
||||
description:
|
||||
- Unique ID of a linode server. This value is read-only in the sense that
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: linode_v4
|
||||
short_description: Manage instances on the Linode cloud.
|
||||
short_description: Manage instances on the Linode cloud
|
||||
description: Manage instances on the Linode cloud.
|
||||
requirements:
|
||||
- python >= 2.7
|
||||
|
||||
@@ -85,7 +85,7 @@ options:
|
||||
type: str
|
||||
lxc_path:
|
||||
description:
|
||||
- Place container under PATH.
|
||||
- Place container under C(PATH).
|
||||
type: path
|
||||
container_log:
|
||||
description:
|
||||
@@ -104,7 +104,7 @@ options:
|
||||
- debug
|
||||
- DEBUG
|
||||
description:
|
||||
- Set the log level for a container where *container_log* was set.
|
||||
- Set the log level for a container where I(container_log) was set.
|
||||
type: str
|
||||
required: false
|
||||
default: INFO
|
||||
@@ -171,17 +171,17 @@ notes:
|
||||
- Containers must have a unique name. If you attempt to create a container
|
||||
with a name that already exists in the users namespace the module will
|
||||
simply return as "unchanged".
|
||||
- The "container_command" can be used with any state except "absent". If
|
||||
used with state "stopped" the container will be "started", the command
|
||||
executed, and then the container "stopped" again. Likewise if the state
|
||||
is "stopped" and the container does not exist it will be first created,
|
||||
"started", the command executed, and then "stopped". If you use a "|"
|
||||
- The I(container_command) can be used with any state except C(absent). If
|
||||
used with state C(stopped) the container will be C(started), the command
|
||||
executed, and then the container C(stopped) again. Likewise if I(state=stopped)
|
||||
and the container does not exist it will be first created,
|
||||
C(started), the command executed, and then C(stopped). If you use a "|"
|
||||
in the variable you can use common script formatting within the variable
|
||||
itself The "container_command" option will always execute as BASH.
|
||||
When using "container_command" a log file is created in the /tmp/ directory
|
||||
which contains both stdout and stderr of any command executed.
|
||||
- If "archive" is **true** the system will attempt to create a compressed
|
||||
tarball of the running container. The "archive" option supports LVM backed
|
||||
itself. The I(container_command) option will always execute as BASH.
|
||||
When using I(container_command), a log file is created in the C(/tmp/) directory
|
||||
which contains both C(stdout) and C(stderr) of any command executed.
|
||||
- If I(archive=true) the system will attempt to create a compressed
|
||||
tarball of the running container. The I(archive) option supports LVM backed
|
||||
containers and will create a snapshot of the running container when
|
||||
creating the archive.
|
||||
- If your distro does not have a package for C(python3-lxc), which is a
|
||||
@@ -433,7 +433,7 @@ else:
|
||||
HAS_LXC = True
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.parsing.convert_bool import BOOLEANS_FALSE, BOOLEANS_TRUE
|
||||
from ansible.module_utils.parsing.convert_bool import boolean, BOOLEANS_FALSE
|
||||
from ansible.module_utils.common.text.converters import to_text, to_bytes
|
||||
|
||||
|
||||
@@ -607,10 +607,10 @@ class LxcContainerManagement(object):
|
||||
:type module: ``object``
|
||||
"""
|
||||
self.module = module
|
||||
self.state = self.module.params.get('state', None)
|
||||
self.state = self.module.params['state']
|
||||
self.state_change = False
|
||||
self.lxc_vg = None
|
||||
self.lxc_path = self.module.params.get('lxc_path', None)
|
||||
self.lxc_path = self.module.params['lxc_path']
|
||||
self.container_name = self.module.params['name']
|
||||
self.container = self.get_container_bind()
|
||||
self.archive_info = None
|
||||
@@ -643,10 +643,7 @@ class LxcContainerManagement(object):
|
||||
:returns: True or False if the container is found.
|
||||
:rtype: ``bol``
|
||||
"""
|
||||
if [i for i in lxc.list_containers(config_path=lxc_path) if i == container_name]:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
return any(c == container_name for c in lxc.list_containers(config_path=lxc_path))
|
||||
|
||||
@staticmethod
|
||||
def _add_variables(variables_dict, build_command):
|
||||
@@ -678,13 +675,13 @@ class LxcContainerManagement(object):
|
||||
for v in LXC_BACKING_STORE[self.module.params['backing_store']]:
|
||||
variables.pop(v, None)
|
||||
|
||||
return_dict = dict()
|
||||
false_values = BOOLEANS_FALSE.union([None, ''])
|
||||
for k, v in variables.items():
|
||||
_var = self.module.params.get(k)
|
||||
if _var not in false_values:
|
||||
return_dict[v] = _var
|
||||
return return_dict
|
||||
result = dict(
|
||||
(k, v)
|
||||
for k, v in variables.items()
|
||||
if self.module.params[k] not in false_values
|
||||
)
|
||||
return result
|
||||
|
||||
def _config(self):
|
||||
"""Configure an LXC container.
|
||||
@@ -694,7 +691,7 @@ class LxcContainerManagement(object):
|
||||
restart the container upon completion.
|
||||
"""
|
||||
|
||||
_container_config = self.module.params.get('container_config')
|
||||
_container_config = self.module.params['container_config']
|
||||
if not _container_config:
|
||||
return False
|
||||
|
||||
@@ -784,12 +781,12 @@ class LxcContainerManagement(object):
|
||||
)
|
||||
|
||||
# Load logging for the instance when creating it.
|
||||
if self.module.params.get('clone_snapshot') in BOOLEANS_TRUE:
|
||||
if self.module.params['clone_snapshot']:
|
||||
build_command.append('--snapshot')
|
||||
# Check for backing_store == overlayfs if so force the use of snapshot
|
||||
# If overlay fs is used and snapshot is unset the clone command will
|
||||
# fail with an unsupported type.
|
||||
elif self.module.params.get('backing_store') == 'overlayfs':
|
||||
elif self.module.params['backing_store'] == 'overlayfs':
|
||||
build_command.append('--snapshot')
|
||||
|
||||
rc, return_data, err = self.module.run_command(build_command)
|
||||
@@ -837,7 +834,7 @@ class LxcContainerManagement(object):
|
||||
)
|
||||
|
||||
# Load logging for the instance when creating it.
|
||||
if self.module.params.get('container_log') in BOOLEANS_TRUE:
|
||||
if self.module.params['container_log']:
|
||||
# Set the logging path to the /var/log/lxc if uid is root. else
|
||||
# set it to the home folder of the user executing.
|
||||
try:
|
||||
@@ -862,7 +859,7 @@ class LxcContainerManagement(object):
|
||||
])
|
||||
|
||||
# Add the template commands to the end of the command if there are any
|
||||
template_options = self.module.params.get('template_options', None)
|
||||
template_options = self.module.params['template_options']
|
||||
if template_options:
|
||||
build_command.append('--')
|
||||
build_command += shlex.split(template_options)
|
||||
@@ -919,7 +916,7 @@ class LxcContainerManagement(object):
|
||||
def _execute_command(self):
|
||||
"""Execute a shell command."""
|
||||
|
||||
container_command = self.module.params.get('container_command')
|
||||
container_command = self.module.params['container_command']
|
||||
if container_command:
|
||||
container_state = self._get_state()
|
||||
if container_state == 'frozen':
|
||||
@@ -939,17 +936,16 @@ class LxcContainerManagement(object):
|
||||
|
||||
self.container = self.get_container_bind()
|
||||
for dummy in range(timeout):
|
||||
if self._get_state() != 'running':
|
||||
self.container.start()
|
||||
self.state_change = True
|
||||
# post startup sleep for 1 second.
|
||||
time.sleep(1)
|
||||
else:
|
||||
if self._get_state() == 'running':
|
||||
return True
|
||||
|
||||
self.container.start()
|
||||
self.state_change = True
|
||||
# post startup sleep for 1 second.
|
||||
time.sleep(1)
|
||||
self.failure(
|
||||
lxc_container=self._container_data(),
|
||||
error='Failed to start container'
|
||||
' [ %s ]' % self.container_name,
|
||||
error='Failed to start container [ %s ]' % self.container_name,
|
||||
rc=1,
|
||||
msg='The container [ %s ] failed to start. Check to lxc is'
|
||||
' available and that the container is in a functional'
|
||||
@@ -962,7 +958,7 @@ class LxcContainerManagement(object):
|
||||
This will store archive_info in as self.archive_info
|
||||
"""
|
||||
|
||||
if self.module.params.get('archive') in BOOLEANS_TRUE:
|
||||
if self.module.params['archive']:
|
||||
self.archive_info = {
|
||||
'archive': self._container_create_tar()
|
||||
}
|
||||
@@ -973,7 +969,7 @@ class LxcContainerManagement(object):
|
||||
This will store archive_info in as self.archive_info
|
||||
"""
|
||||
|
||||
clone_name = self.module.params.get('clone_name')
|
||||
clone_name = self.module.params['clone_name']
|
||||
if clone_name:
|
||||
if not self._container_exists(container_name=clone_name, lxc_path=self.lxc_path):
|
||||
self.clone_info = {
|
||||
@@ -1339,11 +1335,11 @@ class LxcContainerManagement(object):
|
||||
|
||||
old_umask = os.umask(int('0077', 8))
|
||||
|
||||
archive_path = self.module.params.get('archive_path')
|
||||
archive_path = self.module.params['archive_path']
|
||||
if not os.path.isdir(archive_path):
|
||||
os.makedirs(archive_path)
|
||||
|
||||
archive_compression = self.module.params.get('archive_compression')
|
||||
archive_compression = self.module.params['archive_compression']
|
||||
compression_type = LXC_COMPRESSION_MAP[archive_compression]
|
||||
|
||||
# remove trailing / if present.
|
||||
@@ -1357,9 +1353,7 @@ class LxcContainerManagement(object):
|
||||
|
||||
build_command = [
|
||||
self.module.get_bin_path('tar', True),
|
||||
'--directory=%s' % os.path.realpath(
|
||||
os.path.expanduser(source_dir)
|
||||
),
|
||||
'--directory=%s' % os.path.realpath(source_dir),
|
||||
compression_type['argument'],
|
||||
archive_name,
|
||||
'.'
|
||||
@@ -1702,7 +1696,6 @@ def main():
|
||||
),
|
||||
clone_name=dict(
|
||||
type='str',
|
||||
required=False
|
||||
),
|
||||
clone_snapshot=dict(
|
||||
type='bool',
|
||||
@@ -1731,9 +1724,8 @@ def main():
|
||||
msg='The `lxc` module is not importable. Check the requirements.'
|
||||
)
|
||||
|
||||
lv_name = module.params.get('lv_name')
|
||||
if not lv_name:
|
||||
module.params['lv_name'] = module.params.get('name')
|
||||
if not module.params['lv_name']:
|
||||
module.params['lv_name'] = module.params['name']
|
||||
|
||||
lxc_manage = LxcContainerManagement(module=module)
|
||||
lxc_manage.run()
|
||||
|
||||
@@ -12,7 +12,7 @@ DOCUMENTATION = '''
|
||||
---
|
||||
module: memset_memstore_info
|
||||
author: "Simon Weald (@glitchcrab)"
|
||||
short_description: Retrieve Memstore product usage information.
|
||||
short_description: Retrieve Memstore product usage information
|
||||
notes:
|
||||
- An API key generated via the Memset customer control panel is needed with the
|
||||
following minimum scope - I(memstore.usage).
|
||||
|
||||
@@ -12,7 +12,7 @@ DOCUMENTATION = '''
|
||||
---
|
||||
module: memset_server_info
|
||||
author: "Simon Weald (@glitchcrab)"
|
||||
short_description: Retrieve server information.
|
||||
short_description: Retrieve server information
|
||||
notes:
|
||||
- An API key generated via the Memset customer control panel is needed with the
|
||||
following minimum scope - I(server.info).
|
||||
|
||||
@@ -12,7 +12,7 @@ DOCUMENTATION = '''
|
||||
---
|
||||
module: memset_zone
|
||||
author: "Simon Weald (@glitchcrab)"
|
||||
short_description: Creates and deletes Memset DNS zones.
|
||||
short_description: Creates and deletes Memset DNS zones
|
||||
notes:
|
||||
- Zones can be thought of as a logical group of domains, all of which share the
|
||||
same DNS records (i.e. they point to the same IP). An API key generated via the
|
||||
@@ -44,6 +44,7 @@ options:
|
||||
- The default TTL for all records created in the zone. This must be a
|
||||
valid int from U(https://www.memset.com/apidocs/methods_dns.html#dns.zone_create).
|
||||
type: int
|
||||
default: 0
|
||||
choices: [ 0, 300, 600, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400 ]
|
||||
force:
|
||||
required: false
|
||||
|
||||
@@ -12,7 +12,7 @@ DOCUMENTATION = '''
|
||||
---
|
||||
module: memset_zone_domain
|
||||
author: "Simon Weald (@glitchcrab)"
|
||||
short_description: Create and delete domains in Memset DNS zones.
|
||||
short_description: Create and delete domains in Memset DNS zones
|
||||
notes:
|
||||
- Zone domains can be thought of as a collection of domains, all of which share the
|
||||
same DNS records (i.e. they point to the same IP). An API key generated via the
|
||||
|
||||
@@ -12,7 +12,7 @@ DOCUMENTATION = '''
|
||||
---
|
||||
module: memset_zone_record
|
||||
author: "Simon Weald (@glitchcrab)"
|
||||
short_description: Create and delete records in Memset DNS zones.
|
||||
short_description: Create and delete records in Memset DNS zones
|
||||
notes:
|
||||
- Zones can be thought of as a logical group of domains, all of which share the
|
||||
same DNS records (i.e. they point to the same IP). An API key generated via the
|
||||
@@ -44,11 +44,13 @@ options:
|
||||
description:
|
||||
- C(SRV) and C(TXT) record priority, in the range 0 > 999 (inclusive).
|
||||
type: int
|
||||
default: 0
|
||||
record:
|
||||
required: false
|
||||
description:
|
||||
- The subdomain to create.
|
||||
type: str
|
||||
default: ''
|
||||
type:
|
||||
required: true
|
||||
description:
|
||||
@@ -65,6 +67,7 @@ options:
|
||||
description:
|
||||
- The record's TTL in seconds (will inherit zone's TTL if not explicitly set). This must be a
|
||||
valid int from U(https://www.memset.com/apidocs/methods_dns.html#dns.zone_record_create).
|
||||
default: 0
|
||||
choices: [ 0, 300, 600, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400 ]
|
||||
type: int
|
||||
zone:
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: cloud_init_data_facts
|
||||
short_description: Retrieve facts of cloud-init.
|
||||
short_description: Retrieve facts of cloud-init
|
||||
description:
|
||||
- Gathers facts by reading the status.json and result.json of cloud-init.
|
||||
author: René Moser (@resmo)
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: proxmox
|
||||
short_description: management of instances in Proxmox VE cluster
|
||||
short_description: Management of instances in Proxmox VE cluster
|
||||
description:
|
||||
- allows you to create/delete/stop instances in Proxmox VE cluster
|
||||
- Starting in Ansible 2.1, it automatically detects containerization type (lxc for PVE 4, openvz for older)
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
module: proxmox_disk
|
||||
short_description: Management of a disk of a Qemu(KVM) VM in a Proxmox VE cluster.
|
||||
short_description: Management of a disk of a Qemu(KVM) VM in a Proxmox VE cluster
|
||||
version_added: 5.7.0
|
||||
description:
|
||||
- Allows you to perform some supported operations on a disk in Qemu(KVM) Virtual Machines in a Proxmox VE cluster.
|
||||
@@ -725,7 +725,7 @@ def main():
|
||||
actual_size = disk_config['size']
|
||||
if size == actual_size:
|
||||
module.exit_json(changed=False, vmid=vmid, msg="Disk %s is already %s size" % (disk, size))
|
||||
proxmox.proxmox_api.nodes(vm['node']).qemu(vmid).resize.set(vmid=vmid, disk=disk, size=size)
|
||||
proxmox.proxmox_api.nodes(vm['node']).qemu(vmid).resize.set(disk=disk, size=size)
|
||||
module.exit_json(changed=True, vmid=vmid, msg="Disk %s resized in VM %s" % (disk, vmid))
|
||||
except Exception as e:
|
||||
module.fail_json(msg="Failed to resize disk %s in VM %s with exception: %s" % (disk, vmid, str(e)))
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
module: proxmox_kvm
|
||||
short_description: Management of Qemu(KVM) Virtual Machines in Proxmox VE cluster.
|
||||
short_description: Management of Qemu(KVM) Virtual Machines in Proxmox VE cluster
|
||||
description:
|
||||
- Allows you to create/delete/stop Qemu(KVM) Virtual Machines in Proxmox VE cluster.
|
||||
- Since community.general 4.0.0 on, there are no more default values, see I(proxmox_default_behavior).
|
||||
@@ -963,7 +963,7 @@ class ProxmoxKvmAnsible(ProxmoxAnsible):
|
||||
if 'agent' in kwargs:
|
||||
try:
|
||||
# The API also allows booleans instead of e.g. `enabled=1` for backward-compatibility.
|
||||
kwargs['agent'] = boolean(kwargs['agent'], strict=True)
|
||||
kwargs['agent'] = int(boolean(kwargs['agent'], strict=True))
|
||||
except TypeError:
|
||||
# Not something that Ansible would parse as a boolean.
|
||||
pass
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
module: proxmox_nic
|
||||
short_description: Management of a NIC of a Qemu(KVM) VM in a Proxmox VE cluster.
|
||||
short_description: Management of a NIC of a Qemu(KVM) VM in a Proxmox VE cluster
|
||||
version_added: 3.1.0
|
||||
description:
|
||||
- Allows you to create/update/delete a NIC on Qemu(KVM) Virtual Machines in a Proxmox VE cluster.
|
||||
|
||||
@@ -12,7 +12,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: proxmox_template
|
||||
short_description: management of OS templates in Proxmox VE cluster
|
||||
short_description: Management of OS templates in Proxmox VE cluster
|
||||
description:
|
||||
- allows you to upload/delete templates in Proxmox VE cluster
|
||||
options:
|
||||
|
||||
@@ -54,6 +54,7 @@ options:
|
||||
description:
|
||||
- The RHEV/oVirt cluster in which you want you VM to start.
|
||||
type: str
|
||||
default: ''
|
||||
datacenter:
|
||||
description:
|
||||
- The RHEV/oVirt datacenter in which you want you VM to start.
|
||||
|
||||
@@ -35,11 +35,13 @@ options:
|
||||
- The name of the serverless framework project stage to deploy to.
|
||||
- This uses the serverless framework default "dev".
|
||||
type: str
|
||||
default: ''
|
||||
region:
|
||||
description:
|
||||
- AWS region to deploy the service to.
|
||||
- This parameter defaults to C(us-east-1).
|
||||
type: str
|
||||
default: ''
|
||||
deploy:
|
||||
description:
|
||||
- Whether or not to deploy artifacts after building them.
|
||||
|
||||
@@ -105,6 +105,7 @@ options:
|
||||
resources selected here will also auto-include any dependencies.
|
||||
type: list
|
||||
elements: str
|
||||
default: []
|
||||
lock:
|
||||
description:
|
||||
- Enable statefile locking, if you use a service that accepts locks (such
|
||||
|
||||
@@ -12,7 +12,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: xenserver_facts
|
||||
short_description: get facts reported on xenserver
|
||||
short_description: Get facts reported on xenserver
|
||||
description:
|
||||
- Reads data out of XenAPI, can be used instead of multiple xe commands.
|
||||
author:
|
||||
@@ -162,9 +162,7 @@ def get_srs(session):
|
||||
|
||||
|
||||
def main():
|
||||
module = AnsibleModule(
|
||||
supports_check_mode=True,
|
||||
)
|
||||
module = AnsibleModule({}, supports_check_mode=True)
|
||||
|
||||
if not HAVE_XENAPI:
|
||||
module.fail_json(changed=False, msg="python xen api required for this module")
|
||||
|
||||
@@ -10,7 +10,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: oneandone_firewall_policy
|
||||
short_description: Configure 1&1 firewall policy.
|
||||
short_description: Configure 1&1 firewall policy
|
||||
description:
|
||||
- Create, remove, reconfigure, update firewall policies.
|
||||
This module has a dependency on 1and1 >= 1.0
|
||||
@@ -48,6 +48,7 @@ options:
|
||||
(port_from, port_to, and source)
|
||||
type: list
|
||||
elements: dict
|
||||
default: []
|
||||
add_server_ips:
|
||||
description:
|
||||
- A list of server identifiers (id or name) to be assigned to a firewall policy.
|
||||
@@ -55,12 +56,14 @@ options:
|
||||
type: list
|
||||
elements: str
|
||||
required: false
|
||||
default: []
|
||||
remove_server_ips:
|
||||
description:
|
||||
- A list of server IP ids to be unassigned from a firewall policy. Used in combination with update state.
|
||||
type: list
|
||||
elements: str
|
||||
required: false
|
||||
default: []
|
||||
add_rules:
|
||||
description:
|
||||
- A list of rules that will be added to an existing firewall policy.
|
||||
@@ -68,12 +71,14 @@ options:
|
||||
type: list
|
||||
elements: dict
|
||||
required: false
|
||||
default: []
|
||||
remove_rules:
|
||||
description:
|
||||
- A list of rule ids that will be removed from an existing firewall policy. Used in combination with update state.
|
||||
type: list
|
||||
elements: str
|
||||
required: false
|
||||
default: []
|
||||
description:
|
||||
description:
|
||||
- Firewall policy description. maxLength=256
|
||||
|
||||
@@ -10,7 +10,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: oneandone_load_balancer
|
||||
short_description: Configure 1&1 load balancer.
|
||||
short_description: Configure 1&1 load balancer
|
||||
description:
|
||||
- Create, remove, update load balancers.
|
||||
This module has a dependency on 1and1 >= 1.0
|
||||
@@ -86,6 +86,7 @@ options:
|
||||
port_balancer, and port_server parameters, in addition to source parameter, which is optional.
|
||||
type: list
|
||||
elements: dict
|
||||
default: []
|
||||
description:
|
||||
description:
|
||||
- Description of the load balancer. maxLength=256
|
||||
@@ -98,12 +99,14 @@ options:
|
||||
type: list
|
||||
elements: str
|
||||
required: false
|
||||
default: []
|
||||
remove_server_ips:
|
||||
description:
|
||||
- A list of server IP ids to be unassigned from a load balancer. Used in combination with update state.
|
||||
type: list
|
||||
elements: str
|
||||
required: false
|
||||
default: []
|
||||
add_rules:
|
||||
description:
|
||||
- A list of rules that will be added to an existing load balancer.
|
||||
@@ -111,12 +114,14 @@ options:
|
||||
type: list
|
||||
elements: dict
|
||||
required: false
|
||||
default: []
|
||||
remove_rules:
|
||||
description:
|
||||
- A list of rule ids that will be removed from an existing load balancer. Used in combination with update state.
|
||||
type: list
|
||||
elements: str
|
||||
required: false
|
||||
default: []
|
||||
wait:
|
||||
description:
|
||||
- wait for the instance to be in state 'running' before returning
|
||||
|
||||
@@ -10,7 +10,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: oneandone_monitoring_policy
|
||||
short_description: Configure 1&1 monitoring policy.
|
||||
short_description: Configure 1&1 monitoring policy
|
||||
description:
|
||||
- Create, remove, update monitoring policies
|
||||
(and add/remove ports, processes, and servers).
|
||||
@@ -62,6 +62,7 @@ options:
|
||||
and value is used to advise when the value is exceeded.
|
||||
type: list
|
||||
elements: dict
|
||||
default: []
|
||||
suboptions:
|
||||
cpu:
|
||||
description:
|
||||
@@ -88,6 +89,7 @@ options:
|
||||
- Array of ports that will be monitoring.
|
||||
type: list
|
||||
elements: dict
|
||||
default: []
|
||||
suboptions:
|
||||
protocol:
|
||||
description:
|
||||
@@ -112,6 +114,7 @@ options:
|
||||
- Array of processes that will be monitoring.
|
||||
type: list
|
||||
elements: dict
|
||||
default: []
|
||||
suboptions:
|
||||
process:
|
||||
description:
|
||||
@@ -128,48 +131,56 @@ options:
|
||||
type: list
|
||||
elements: dict
|
||||
required: false
|
||||
default: []
|
||||
add_processes:
|
||||
description:
|
||||
- Processes to add to the monitoring policy.
|
||||
type: list
|
||||
elements: dict
|
||||
required: false
|
||||
default: []
|
||||
add_servers:
|
||||
description:
|
||||
- Servers to add to the monitoring policy.
|
||||
type: list
|
||||
elements: str
|
||||
required: false
|
||||
default: []
|
||||
remove_ports:
|
||||
description:
|
||||
- Ports to remove from the monitoring policy.
|
||||
type: list
|
||||
elements: str
|
||||
required: false
|
||||
default: []
|
||||
remove_processes:
|
||||
description:
|
||||
- Processes to remove from the monitoring policy.
|
||||
type: list
|
||||
elements: str
|
||||
required: false
|
||||
default: []
|
||||
remove_servers:
|
||||
description:
|
||||
- Servers to remove from the monitoring policy.
|
||||
type: list
|
||||
elements: str
|
||||
required: false
|
||||
default: []
|
||||
update_ports:
|
||||
description:
|
||||
- Ports to be updated on the monitoring policy.
|
||||
type: list
|
||||
elements: dict
|
||||
required: false
|
||||
default: []
|
||||
update_processes:
|
||||
description:
|
||||
- Processes to be updated on the monitoring policy.
|
||||
type: list
|
||||
elements: dict
|
||||
required: false
|
||||
default: []
|
||||
wait:
|
||||
description:
|
||||
- wait for the instance to be in state 'running' before returning
|
||||
|
||||
@@ -10,7 +10,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: oneandone_private_network
|
||||
short_description: Configure 1&1 private networking.
|
||||
short_description: Configure 1&1 private networking
|
||||
description:
|
||||
- Create, remove, reconfigure, update a private network.
|
||||
This module has a dependency on 1and1 >= 1.0
|
||||
@@ -62,11 +62,13 @@ options:
|
||||
- List of server identifiers (name or id) to be added to the private network.
|
||||
type: list
|
||||
elements: str
|
||||
default: []
|
||||
remove_members:
|
||||
description:
|
||||
- List of server identifiers (name or id) to be removed from the private network.
|
||||
type: list
|
||||
elements: str
|
||||
default: []
|
||||
wait:
|
||||
description:
|
||||
- wait for the instance to be in state 'running' before returning
|
||||
|
||||
@@ -10,7 +10,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: oneandone_public_ip
|
||||
short_description: Configure 1&1 public IPs.
|
||||
short_description: Configure 1&1 public IPs
|
||||
description:
|
||||
- Create, update, and remove public IPs.
|
||||
This module has a dependency on 1and1 >= 1.0
|
||||
|
||||
@@ -10,7 +10,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: oneandone_server
|
||||
short_description: Create, destroy, start, stop, and reboot a 1&1 Host server.
|
||||
short_description: Create, destroy, start, stop, and reboot a 1&1 Host server
|
||||
description:
|
||||
- Create, destroy, update, start, stop, and reboot a 1&1 Host server.
|
||||
When the server is created it can optionally wait for it to be 'running' before returning.
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
module: online_server_info
|
||||
short_description: Gather information about Online servers.
|
||||
short_description: Gather information about Online servers
|
||||
description:
|
||||
- Gather information about the servers.
|
||||
- U(https://www.online.net/en/dedicated-server)
|
||||
|
||||
@@ -9,7 +9,7 @@ __metaclass__ = type
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
module: online_user_info
|
||||
short_description: Gather information about Online user.
|
||||
short_description: Gather information about Online user
|
||||
description:
|
||||
- Gather information about the user.
|
||||
author:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) Ansible Project
|
||||
# Copyright (c) 2018, Milan Ilic <milani@nordeus.com>
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
@@ -8,25 +8,6 @@
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
"""
|
||||
(c) 2018, Milan Ilic <milani@nordeus.com>
|
||||
|
||||
This file is part of Ansible
|
||||
|
||||
Ansible is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Ansible is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a clone of the GNU General Public License
|
||||
along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: one_image
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) Ansible Project
|
||||
# Copyright (c) 2018, Milan Ilic <milani@nordeus.com>
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
@@ -8,25 +8,6 @@
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
"""
|
||||
(c) 2018, Milan Ilic <milani@nordeus.com>
|
||||
|
||||
This file is part of Ansible
|
||||
|
||||
Ansible is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Ansible is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a clone of the GNU General Public License
|
||||
along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: one_image_info
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) Ansible Project
|
||||
# Copyright (c) 2017, Milan Ilic <milani@nordeus.com>
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
@@ -8,25 +8,6 @@
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
"""
|
||||
(c) 2017, Milan Ilic <milani@nordeus.com>
|
||||
|
||||
This file is part of Ansible
|
||||
|
||||
Ansible is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Ansible is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: one_service
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) Ansible Project
|
||||
# Copyright (c) 2017, Milan Ilic <milani@nordeus.com>
|
||||
# Copyright (c) 2019, Jan Meerkamp <meerkamp@dvv.de>
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
@@ -8,26 +9,6 @@
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
"""
|
||||
(c) 2017, Milan Ilic <milani@nordeus.com>
|
||||
(c) 2019, Jan Meerkamp <meerkamp@dvv.de>
|
||||
|
||||
This file is part of Ansible
|
||||
|
||||
Ansible is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Ansible is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: one_vm
|
||||
@@ -989,7 +970,7 @@ def get_vm_labels_and_attributes_dict(client, vm_id):
|
||||
if key != 'LABELS':
|
||||
attrs_dict[key] = value
|
||||
else:
|
||||
if key is not None:
|
||||
if key is not None and value is not None:
|
||||
labels_list = value.split(',')
|
||||
|
||||
return labels_list, attrs_dict
|
||||
|
||||
@@ -14,7 +14,7 @@ DOCUMENTATION = '''
|
||||
---
|
||||
module: packet_device
|
||||
|
||||
short_description: Manage a bare metal server in the Packet Host.
|
||||
short_description: Manage a bare metal server in the Packet Host
|
||||
|
||||
description:
|
||||
- Manage a bare metal server in the Packet Host (a "device" in the API terms).
|
||||
@@ -136,6 +136,7 @@ options:
|
||||
- URL of custom iPXE script for provisioning.
|
||||
- More about custom iPXE for Packet devices at U(https://help.packet.net/technical/infrastructure/custom-ipxe).
|
||||
type: str
|
||||
default: ''
|
||||
|
||||
always_pxe:
|
||||
description:
|
||||
|
||||
@@ -14,7 +14,7 @@ DOCUMENTATION = '''
|
||||
---
|
||||
module: packet_ip_subnet
|
||||
|
||||
short_description: Assign IP subnet to a bare metal server.
|
||||
short_description: Assign IP subnet to a bare metal server
|
||||
|
||||
description:
|
||||
- Assign or unassign IPv4 or IPv6 subnets to or from a device in the Packet host.
|
||||
|
||||
@@ -14,7 +14,7 @@ DOCUMENTATION = '''
|
||||
---
|
||||
module: packet_project
|
||||
|
||||
short_description: Create/delete a project in Packet host.
|
||||
short_description: Create/delete a project in Packet host
|
||||
|
||||
description:
|
||||
- Create/delete a project in Packet host.
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: packet_sshkey
|
||||
short_description: Create/delete an SSH key in Packet host.
|
||||
short_description: Create/delete an SSH key in Packet host
|
||||
description:
|
||||
- Create/delete an SSH key in Packet host.
|
||||
- API is documented at U(https://www.packet.net/help/api/#page:ssh-keys,header:ssh-keys-ssh-keys-post).
|
||||
|
||||
@@ -13,7 +13,7 @@ DOCUMENTATION = '''
|
||||
---
|
||||
module: packet_volume
|
||||
|
||||
short_description: Create/delete a volume in Packet host.
|
||||
short_description: Create/delete a volume in Packet host
|
||||
|
||||
description:
|
||||
- Create/delete a volume in Packet host.
|
||||
|
||||
@@ -14,7 +14,7 @@ DOCUMENTATION = '''
|
||||
---
|
||||
module: packet_volume_attachment
|
||||
|
||||
short_description: Attach/detach a volume to a device in the Packet host.
|
||||
short_description: Attach/detach a volume to a device in the Packet host
|
||||
|
||||
description:
|
||||
- Attach/detach a volume to a device in the Packet host.
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: profitbricks
|
||||
short_description: Create, destroy, start, stop, and reboot a ProfitBricks virtual machine.
|
||||
short_description: Create, destroy, start, stop, and reboot a ProfitBricks virtual machine
|
||||
description:
|
||||
- Create, destroy, update, start, stop, and reboot a ProfitBricks virtual machine. When the virtual machine is created it can optionally wait
|
||||
for it to be 'running' before returning. This module has a dependency on profitbricks >= 1.0.0
|
||||
@@ -38,6 +38,7 @@ options:
|
||||
- Public SSH keys allowing access to the virtual machine.
|
||||
type: list
|
||||
elements: str
|
||||
default: []
|
||||
datacenter:
|
||||
description:
|
||||
- The datacenter to provision this virtual machine.
|
||||
@@ -74,6 +75,7 @@ options:
|
||||
- list of instance ids, currently only used when state='absent' to remove instances.
|
||||
type: list
|
||||
elements: str
|
||||
default: []
|
||||
count:
|
||||
description:
|
||||
- The number of virtual machines to create.
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: profitbricks_datacenter
|
||||
short_description: Create or destroy a ProfitBricks Virtual Datacenter.
|
||||
short_description: Create or destroy a ProfitBricks Virtual Datacenter
|
||||
description:
|
||||
- This is a simple module that supports creating or removing vDCs. A vDC is required before you can create servers. This module has a dependency
|
||||
on profitbricks >= 1.0.0
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: profitbricks_nic
|
||||
short_description: Create or Remove a NIC.
|
||||
short_description: Create or Remove a NIC
|
||||
description:
|
||||
- This module allows you to create or restore a volume snapshot. This module has a dependency on profitbricks >= 1.0.0
|
||||
options:
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: profitbricks_volume
|
||||
short_description: Create or destroy a volume.
|
||||
short_description: Create or destroy a volume
|
||||
description:
|
||||
- Allows you to create or remove a volume from a ProfitBricks datacenter. This module has a dependency on profitbricks >= 1.0.0
|
||||
options:
|
||||
@@ -50,7 +50,7 @@ options:
|
||||
- Public SSH keys allowing access to the virtual machine.
|
||||
type: list
|
||||
elements: str
|
||||
required: false
|
||||
default: []
|
||||
disk_type:
|
||||
description:
|
||||
- The disk type of the volume.
|
||||
@@ -81,7 +81,7 @@ options:
|
||||
- list of instance ids, currently only used when state='absent' to remove instances.
|
||||
type: list
|
||||
elements: str
|
||||
required: false
|
||||
default: []
|
||||
subscription_user:
|
||||
description:
|
||||
- The ProfitBricks username. Overrides the PB_SUBSCRIPTION_ID environment variable.
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: profitbricks_volume_attachments
|
||||
short_description: Attach or detach a volume.
|
||||
short_description: Attach or detach a volume
|
||||
description:
|
||||
- Allows you to attach or detach a volume from a ProfitBricks server. This module has a dependency on profitbricks >= 1.0.0
|
||||
options:
|
||||
|
||||
@@ -17,7 +17,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: pubnub_blocks
|
||||
short_description: PubNub blocks management module.
|
||||
short_description: PubNub blocks management module
|
||||
description:
|
||||
- "This module allows Ansible to interface with the PubNub BLOCKS
|
||||
infrastructure by providing the following operations: create / remove,
|
||||
@@ -37,6 +37,7 @@ options:
|
||||
same play)."
|
||||
required: false
|
||||
type: str
|
||||
default: ''
|
||||
password:
|
||||
description:
|
||||
- Password which match to account to which specified C(email) belong.
|
||||
@@ -44,6 +45,7 @@ options:
|
||||
same play)."
|
||||
required: false
|
||||
type: str
|
||||
default: ''
|
||||
cache:
|
||||
description: >
|
||||
In case if single play use blocks management module few times it is
|
||||
@@ -58,7 +60,7 @@ options:
|
||||
manage blocks."
|
||||
- "User's account will be used if value not set or empty."
|
||||
type: str
|
||||
required: false
|
||||
default: ''
|
||||
application:
|
||||
description:
|
||||
- "Name of target PubNub application for which blocks configuration on
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: rax
|
||||
short_description: create / delete an instance in Rackspace Public Cloud
|
||||
short_description: Create / delete an instance in Rackspace Public Cloud
|
||||
description:
|
||||
- creates / deletes a Rackspace Public Cloud instance and optionally
|
||||
waits for it to be 'running'.
|
||||
@@ -82,17 +82,20 @@ options:
|
||||
default: false
|
||||
extra_client_args:
|
||||
type: dict
|
||||
default: {}
|
||||
description:
|
||||
- A hash of key/value pairs to be used when creating the cloudservers
|
||||
client. This is considered an advanced option, use it wisely and
|
||||
with caution.
|
||||
extra_create_args:
|
||||
type: dict
|
||||
default: {}
|
||||
description:
|
||||
- A hash of key/value pairs to be used when creating a new server.
|
||||
This is considered an advanced option, use it wisely and with caution.
|
||||
files:
|
||||
type: dict
|
||||
default: {}
|
||||
description:
|
||||
- Files to insert into the instance. remotefilename:localcontent
|
||||
flavor:
|
||||
@@ -124,6 +127,7 @@ options:
|
||||
- keypair
|
||||
meta:
|
||||
type: dict
|
||||
default: {}
|
||||
description:
|
||||
- A hash of metadata to associate with the instance
|
||||
name:
|
||||
|
||||
@@ -26,6 +26,7 @@ options:
|
||||
C(name). This option requires C(pyrax>=1.9.3).
|
||||
meta:
|
||||
type: dict
|
||||
default: {}
|
||||
description:
|
||||
- A hash of metadata to associate with the volume.
|
||||
name:
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: rax_cdb
|
||||
short_description: create/delete or resize a Rackspace Cloud Databases instance
|
||||
short_description: Create/delete or resize a Rackspace Cloud Databases instance
|
||||
description:
|
||||
- creates / deletes or resize a Rackspace Cloud Databases instance
|
||||
and optionally waits for it to be 'running'. The name option needs to be
|
||||
|
||||
@@ -10,7 +10,7 @@ __metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: rax_cdb_database
|
||||
short_description: 'create / delete a database in the Cloud Databases'
|
||||
short_description: Create / delete a database in the Cloud Databases
|
||||
description:
|
||||
- create / delete a database in the Cloud Databases.
|
||||
options:
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: rax_cdb_user
|
||||
short_description: create / delete a Rackspace Cloud Database
|
||||
short_description: Create / delete a Rackspace Cloud Database
|
||||
description:
|
||||
- create / delete a database in the Cloud Databases.
|
||||
options:
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: rax_clb
|
||||
short_description: create / delete a load balancer in Rackspace Public Cloud
|
||||
short_description: Create / delete a load balancer in Rackspace Public Cloud
|
||||
description:
|
||||
- creates / deletes a Rackspace Public Cloud load balancer.
|
||||
options:
|
||||
@@ -28,6 +28,7 @@ options:
|
||||
default: LEAST_CONNECTIONS
|
||||
meta:
|
||||
type: dict
|
||||
default: {}
|
||||
description:
|
||||
- A hash of metadata to associate with the instance
|
||||
name:
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: rax_clb_nodes
|
||||
short_description: add, modify and remove nodes from a Rackspace Cloud Load Balancer
|
||||
short_description: Add, modify and remove nodes from a Rackspace Cloud Load Balancer
|
||||
description:
|
||||
- Adds, modifies and removes nodes from a Rackspace Cloud Load Balancer
|
||||
options:
|
||||
|
||||
@@ -10,7 +10,7 @@ __metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: rax_clb_ssl
|
||||
short_description: Manage SSL termination for a Rackspace Cloud Load Balancer.
|
||||
short_description: Manage SSL termination for a Rackspace Cloud Load Balancer
|
||||
description:
|
||||
- Set up, reconfigure, or remove SSL termination for an existing load balancer.
|
||||
options:
|
||||
|
||||
@@ -27,6 +27,7 @@ options:
|
||||
- The container to use for container or metadata operations.
|
||||
meta:
|
||||
type: dict
|
||||
default: {}
|
||||
description:
|
||||
- A hash of items to set as metadata values on a container
|
||||
private:
|
||||
|
||||
@@ -38,6 +38,7 @@ options:
|
||||
- Used to set an expiration in seconds on an uploaded file or folder.
|
||||
meta:
|
||||
type: dict
|
||||
default: {}
|
||||
description:
|
||||
- Items to set as metadata values on an uploaded file or folder.
|
||||
method:
|
||||
|
||||
@@ -30,6 +30,7 @@ options:
|
||||
- Server name to modify metadata for
|
||||
meta:
|
||||
type: dict
|
||||
default: {}
|
||||
description:
|
||||
- A hash of metadata to associate with the instance
|
||||
author: "Matt Martz (@sivel)"
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: rax_mon_alarm
|
||||
short_description: Create or delete a Rackspace Cloud Monitoring alarm.
|
||||
short_description: Create or delete a Rackspace Cloud Monitoring alarm
|
||||
description:
|
||||
- Create or delete a Rackspace Cloud Monitoring alarm that associates an
|
||||
existing rax_mon_entity, rax_mon_check, and rax_mon_notification_plan with
|
||||
|
||||
@@ -87,6 +87,7 @@ options:
|
||||
I(ip_addresses) hash to resolve an IP address to target.
|
||||
details:
|
||||
type: dict
|
||||
default: {}
|
||||
description:
|
||||
- Additional details specific to the check type. Must be a hash of strings
|
||||
between 1 and 255 characters long, or an array or object containing 0 to
|
||||
@@ -98,6 +99,7 @@ options:
|
||||
default: false
|
||||
metadata:
|
||||
type: dict
|
||||
default: {}
|
||||
description:
|
||||
- Hash of arbitrary key-value pairs to accompany this check if it fires.
|
||||
Keys and values must be strings between 1 and 255 characters long.
|
||||
|
||||
@@ -38,6 +38,7 @@ options:
|
||||
bound. Necessary to collect C(agent.) rax_mon_checks against this entity.
|
||||
named_ip_addresses:
|
||||
type: dict
|
||||
default: {}
|
||||
description:
|
||||
- Hash of IP addresses that may be referenced by name by rax_mon_checks
|
||||
added to this entity. Must be a dictionary of with keys that are names
|
||||
@@ -45,6 +46,7 @@ options:
|
||||
addresses.
|
||||
metadata:
|
||||
type: dict
|
||||
default: {}
|
||||
description:
|
||||
- Hash of arbitrary C(name), C(value) pairs that are passed to associated
|
||||
rax_mon_alarms. Names and values must all be between 1 and 255 characters
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: rax_mon_notification
|
||||
short_description: Create or delete a Rackspace Cloud Monitoring notification.
|
||||
short_description: Create or delete a Rackspace Cloud Monitoring notification
|
||||
description:
|
||||
- Create or delete a Rackspace Cloud Monitoring notification that specifies a
|
||||
channel that can be used to communicate alarms, such as email, webhooks, or
|
||||
|
||||
@@ -11,7 +11,7 @@ __metaclass__ = type
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: rax_network
|
||||
short_description: create / delete an isolated network in Rackspace Public Cloud
|
||||
short_description: Create / delete an isolated network in Rackspace Public Cloud
|
||||
description:
|
||||
- creates / deletes a Rackspace Public Cloud isolated network.
|
||||
options:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user