mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-05-12 04:22:00 +00:00
Compare commits
20 Commits
1.4.0
...
3abd029b9f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3abd029b9f | ||
|
|
3d2681aea6 | ||
|
|
0224e4d415 | ||
|
|
cc20deaad2 | ||
|
|
5e0a6592ca | ||
|
|
acd5a2b17e | ||
|
|
e629ae2d7c | ||
|
|
abfe36c62f | ||
|
|
6c0b91a3ee | ||
|
|
f7fac90009 | ||
|
|
c4be75114b | ||
|
|
6da0cbb3d3 | ||
|
|
17fc3bcce6 | ||
|
|
d7c7d1d2c8 | ||
|
|
55bd196e82 | ||
|
|
f451f2211b | ||
|
|
18c847a8a0 | ||
|
|
ee65205607 | ||
|
|
2c9c3a0f54 | ||
|
|
c1f830f3df |
@@ -36,7 +36,7 @@ variables:
|
|||||||
resources:
|
resources:
|
||||||
containers:
|
containers:
|
||||||
- container: default
|
- container: default
|
||||||
image: quay.io/ansible/azure-pipelines-test-container:1.9.0
|
image: quay.io/ansible/azure-pipelines-test-container:3.0.0
|
||||||
|
|
||||||
pool: Standard
|
pool: Standard
|
||||||
|
|
||||||
@@ -53,16 +53,14 @@ stages:
|
|||||||
targets:
|
targets:
|
||||||
- name: CentOS 7
|
- name: CentOS 7
|
||||||
test: centos7
|
test: centos7
|
||||||
- name: Fedora 34
|
- name: Fedora 36
|
||||||
test: fedora34
|
test: fedora36
|
||||||
- name: Fedora 35
|
|
||||||
test: fedora35
|
|
||||||
- name: openSUSE 15 py3
|
- name: openSUSE 15 py3
|
||||||
test: opensuse15
|
test: opensuse15
|
||||||
- name: Ubuntu 18.04
|
|
||||||
test: ubuntu1804
|
|
||||||
- name: Ubuntu 20.04
|
- name: Ubuntu 20.04
|
||||||
test: ubuntu2004
|
test: ubuntu2004
|
||||||
|
- name: Ubuntu 22.04
|
||||||
|
test: ubuntu2204
|
||||||
- stage: Docker_2_13
|
- stage: Docker_2_13
|
||||||
displayName: Docker 2.13
|
displayName: Docker 2.13
|
||||||
dependsOn: []
|
dependsOn: []
|
||||||
@@ -193,12 +191,12 @@ stages:
|
|||||||
test: macos/12.0
|
test: macos/12.0
|
||||||
- name: RHEL 7.9
|
- name: RHEL 7.9
|
||||||
test: rhel/7.9
|
test: rhel/7.9
|
||||||
- name: RHEL 8.5
|
- name: RHEL 8.6
|
||||||
test: rhel/8.5
|
test: rhel/8.6
|
||||||
- name: FreeBSD 12.3
|
- name: RHEL 9.0
|
||||||
test: freebsd/12.3
|
test: rhel/9.0
|
||||||
- name: FreeBSD 13.0
|
- name: FreeBSD 13.1
|
||||||
test: freebsd/13.0
|
test: freebsd/13.1
|
||||||
- stage: Remote_2_13
|
- stage: Remote_2_13
|
||||||
displayName: Remote 2.13
|
displayName: Remote 2.13
|
||||||
dependsOn: []
|
dependsOn: []
|
||||||
@@ -249,8 +247,6 @@ stages:
|
|||||||
test: rhel/7.9
|
test: rhel/7.9
|
||||||
- name: RHEL 8.3
|
- name: RHEL 8.3
|
||||||
test: rhel/8.3
|
test: rhel/8.3
|
||||||
- name: FreeBSD 11.4
|
|
||||||
test: freebsd/11.4
|
|
||||||
- name: FreeBSD 12.2
|
- name: FreeBSD 12.2
|
||||||
test: freebsd/12.2
|
test: freebsd/12.2
|
||||||
- stage: Remote_2_10
|
- stage: Remote_2_10
|
||||||
@@ -267,11 +263,6 @@ stages:
|
|||||||
test: rhel/7.9
|
test: rhel/7.9
|
||||||
- name: RHEL 8.2
|
- name: RHEL 8.2
|
||||||
test: rhel/8.2
|
test: rhel/8.2
|
||||||
- name: FreeBSD 11.1
|
|
||||||
test: freebsd/11.1
|
|
||||||
- name: FreeBSD 12.1
|
|
||||||
test: freebsd/12.1
|
|
||||||
|
|
||||||
- stage: Remote_2_9
|
- stage: Remote_2_9
|
||||||
displayName: Remote 2.9
|
displayName: Remote 2.9
|
||||||
dependsOn: []
|
dependsOn: []
|
||||||
@@ -286,10 +277,7 @@ stages:
|
|||||||
test: rhel/7.9
|
test: rhel/7.9
|
||||||
- name: RHEL 8.1
|
- name: RHEL 8.1
|
||||||
test: rhel/8.1
|
test: rhel/8.1
|
||||||
- name: FreeBSD 11.1
|
|
||||||
test: freebsd/11.1
|
|
||||||
- name: FreeBSD 12.0
|
|
||||||
test: freebsd/12.0
|
|
||||||
## Finally
|
## Finally
|
||||||
|
|
||||||
- stage: Summary
|
- stage: Summary
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
trivial:
|
||||||
|
- Update version number in galaxy.yml to 1.5.0.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
trivial:
|
||||||
|
- CI - Refactor AZP to address new test infrastructure (https://github.com/ansible-collections/news-for-maintainers/issues/17).
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
bugfixes:
|
||||||
|
- firewall - Fixed to output a more complete missing library message.
|
||||||
3
changelogs/fragments/375_update_azp_container.yml
Normal file
3
changelogs/fragments/375_update_azp_container.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
trivial:
|
||||||
|
- CI - AZP test container to 3.0.0 (https://github.com/ansible-collections/news-for-maintainers/issues/18).
|
||||||
3
changelogs/fragments/380_update_usage_profile_tasks.yml
Normal file
3
changelogs/fragments/380_update_usage_profile_tasks.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
bugfixes:
|
||||||
|
- Removed contentious terminology to match reference documentation in profile_tasks.
|
||||||
3
changelogs/fragments/386_follow_ci_testing_rules.yml
Normal file
3
changelogs/fragments/386_follow_ci_testing_rules.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
trivial:
|
||||||
|
- CI - following the new CI testing rule ansible-test-sanity-docker-devel.
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
namespace: ansible
|
namespace: ansible
|
||||||
name: posix
|
name: posix
|
||||||
version: 1.4.0
|
version: 1.5.0
|
||||||
readme: README.md
|
readme: README.md
|
||||||
authors:
|
authors:
|
||||||
- Ansible (github.com/ansible)
|
- Ansible (github.com/ansible)
|
||||||
|
|||||||
@@ -102,8 +102,8 @@ class CallbackModule(CallbackBase):
|
|||||||
self._display.display(tasktime())
|
self._display.display(tasktime())
|
||||||
|
|
||||||
def playbook_on_stats(self, stats):
|
def playbook_on_stats(self, stats):
|
||||||
self._display.display(tasktime())
|
# Align summary report header with other callback plugin summary
|
||||||
self._display.display(filled("", fchar="="))
|
self._display.banner("ROLE RECAP")
|
||||||
|
|
||||||
timestamp(self)
|
timestamp(self)
|
||||||
total_time = sum(self.totals.values())
|
total_time = sum(self.totals.values())
|
||||||
@@ -116,3 +116,4 @@ class CallbackModule(CallbackBase):
|
|||||||
msg_total = u"{0:-<70}{1:->9}".format(u'total ', u' {0:.02f}s'.format(total_time))
|
msg_total = u"{0:-<70}{1:->9}".format(u'total ', u' {0:.02f}s'.format(total_time))
|
||||||
self._display.display(filled("", fchar="~"))
|
self._display.display(filled("", fchar="~"))
|
||||||
self._display.display(msg_total)
|
self._display.display(msg_total)
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ DOCUMENTATION = '''
|
|||||||
- It also lists the top/bottom time consuming tasks in the summary (configurable)
|
- It also lists the top/bottom time consuming tasks in the summary (configurable)
|
||||||
- Before 2.4 only the environment variables were available for configuration.
|
- Before 2.4 only the environment variables were available for configuration.
|
||||||
requirements:
|
requirements:
|
||||||
- whitelisting in configuration - see examples section below for details.
|
- enable in configuration - see examples section below for details.
|
||||||
options:
|
options:
|
||||||
output_limit:
|
output_limit:
|
||||||
description: Number of tasks to display in the summary
|
description: Number of tasks to display in the summary
|
||||||
@@ -46,7 +46,7 @@ EXAMPLES = '''
|
|||||||
example: >
|
example: >
|
||||||
To enable, add this to your ansible.cfg file in the defaults block
|
To enable, add this to your ansible.cfg file in the defaults block
|
||||||
[defaults]
|
[defaults]
|
||||||
callback_whitelist = ansible.posix.profile_tasks
|
callbacks_enabled=ansible.posix.profile_tasks
|
||||||
sample output: >
|
sample output: >
|
||||||
#
|
#
|
||||||
# TASK: [ensure messaging security group exists] ********************************
|
# TASK: [ensure messaging security group exists] ********************************
|
||||||
@@ -174,8 +174,8 @@ class CallbackModule(CallbackBase):
|
|||||||
self._display.display(tasktime())
|
self._display.display(tasktime())
|
||||||
|
|
||||||
def playbook_on_stats(self, stats):
|
def playbook_on_stats(self, stats):
|
||||||
self._display.display(tasktime())
|
# Align summary report header with other callback plugin summary
|
||||||
self._display.display(filled("", fchar="="))
|
self._display.banner("TASKS RECAP")
|
||||||
|
|
||||||
timestamp(self)
|
timestamp(self)
|
||||||
self.current = None
|
self.current = None
|
||||||
@@ -199,3 +199,4 @@ class CallbackModule(CallbackBase):
|
|||||||
if 'path' in result:
|
if 'path' in result:
|
||||||
msg += u"\n{0:-<{1}}".format(result['path'] + u' ', self._display.columns)
|
msg += u"\n{0:-<{1}}".format(result['path'] + u' ', self._display.columns)
|
||||||
self._display.display(msg)
|
self._display.display(msg)
|
||||||
|
|
||||||
@@ -46,4 +46,6 @@ class CallbackModule(CallbackBase):
|
|||||||
def v2_playbook_on_stats(self, stats):
|
def v2_playbook_on_stats(self, stats):
|
||||||
end_time = datetime.utcnow()
|
end_time = datetime.utcnow()
|
||||||
runtime = end_time - self.start_time
|
runtime = end_time - self.start_time
|
||||||
self._display.display("Playbook run took %s days, %s hours, %s minutes, %s seconds" % (self.days_hours_minutes_seconds(runtime)))
|
# Align summary report header with other callback plugin summary
|
||||||
|
self._display.banner("PLAYBOOK RECAP")
|
||||||
|
self._display.display("Playbook run took %s days, %s hours, %s minutes, %s seconds\n\r" % (self.days_hours_minutes_seconds(runtime)))
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
from ansible_collections.ansible.posix.plugins.module_utils.version import LooseVersion
|
from ansible_collections.ansible.posix.plugins.module_utils.version import LooseVersion
|
||||||
|
from ansible.module_utils.basic import missing_required_lib
|
||||||
|
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
@@ -314,6 +315,5 @@ class FirewallTransaction(object):
|
|||||||
|
|
||||||
if import_failure:
|
if import_failure:
|
||||||
module.fail_json(
|
module.fail_json(
|
||||||
msg='Python Module not found: firewalld and its python module are required for this module, \
|
msg=missing_required_lib('firewall') + '. Version 0.2.11 or newer required (0.3.9 or newer for offline operations)'
|
||||||
version 0.2.11 or newer required (0.3.9 or newer for offline operations)'
|
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -347,6 +347,8 @@ def keyfile(module, user, write=False, path=None, manage_dir=True, follow=False)
|
|||||||
basedir = os.path.dirname(keysfile)
|
basedir = os.path.dirname(keysfile)
|
||||||
if not os.path.exists(basedir):
|
if not os.path.exists(basedir):
|
||||||
os.makedirs(basedir)
|
os.makedirs(basedir)
|
||||||
|
|
||||||
|
f = None
|
||||||
try:
|
try:
|
||||||
f = open(keysfile, "w") # touches file so we can set ownership and perms
|
f = open(keysfile, "w") # touches file so we can set ownership and perms
|
||||||
finally:
|
finally:
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ def _escape_fstab(v):
|
|||||||
if isinstance(v, int):
|
if isinstance(v, int):
|
||||||
return v
|
return v
|
||||||
else:
|
else:
|
||||||
return(
|
return (
|
||||||
v.
|
v.
|
||||||
replace('\\', '\\134').
|
replace('\\', '\\134').
|
||||||
replace(' ', '\\040').
|
replace(' ', '\\040').
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
# -------------------------------------------------------------
|
# -------------------------------------------------------------
|
||||||
# Setup steps
|
# Setup steps
|
||||||
|
- name: Clean up the working directory and files
|
||||||
|
file:
|
||||||
|
path: '{{ output_dir }}'
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: Create the working directory
|
||||||
|
file:
|
||||||
|
path: '{{ output_dir }}'
|
||||||
|
state: directory
|
||||||
|
|
||||||
- name: copy an existing file in place with comments
|
- name: copy an existing file in place with comments
|
||||||
copy:
|
copy:
|
||||||
|
|||||||
@@ -74,7 +74,14 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# START: HACK install dependencies
|
# START: HACK install dependencies
|
||||||
retry ansible-galaxy collection install community.general
|
if [ "${ansible_version}" == "2.9" ] || [ "${ansible_version}" == "2.10" ]; then
|
||||||
|
# Note: Since community.general 5.x, Ansible Core versions prior to 2.11 are not supported.
|
||||||
|
# So we need to use 4.8.1 for Ansible 2.9 and Ansible Engine 2.10.
|
||||||
|
retry git clone --depth=1 --single-branch -b 4.8.1 https://github.com/ansible-collections/community.general.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/general"
|
||||||
|
else
|
||||||
|
retry git clone --depth=1 --single-branch https://github.com/ansible-collections/community.general.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/general"
|
||||||
|
fi
|
||||||
|
# Note: we're installing with git to work around Galaxy being a huge PITA (https://github.com/ansible/galaxy/issues/2429)
|
||||||
# END: HACK
|
# END: HACK
|
||||||
|
|
||||||
export PYTHONIOENCODING='utf-8'
|
export PYTHONIOENCODING='utf-8'
|
||||||
|
|||||||
Reference in New Issue
Block a user