mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-06-09 18:15:54 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4ac6f63f4 | ||
|
|
b42cbb2a97 | ||
|
|
aaacdb9d13 | ||
|
|
955acdca44 |
@@ -37,8 +37,9 @@ variables:
|
|||||||
resources:
|
resources:
|
||||||
containers:
|
containers:
|
||||||
- container: default
|
- container: default
|
||||||
|
image: quay.io/ansible/azure-pipelines-test-container:8.0.0
|
||||||
|
- container: legacy
|
||||||
image: quay.io/ansible/azure-pipelines-test-container:7.0.0
|
image: quay.io/ansible/azure-pipelines-test-container:7.0.0
|
||||||
|
|
||||||
pool: Standard
|
pool: Standard
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
@@ -128,6 +129,7 @@ stages:
|
|||||||
jobs:
|
jobs:
|
||||||
- template: templates/matrix.yml
|
- template: templates/matrix.yml
|
||||||
parameters:
|
parameters:
|
||||||
|
container: legacy
|
||||||
nameFormat: "{0}"
|
nameFormat: "{0}"
|
||||||
testFormat: 2.17/{0}
|
testFormat: 2.17/{0}
|
||||||
targets:
|
targets:
|
||||||
@@ -145,6 +147,7 @@ stages:
|
|||||||
jobs:
|
jobs:
|
||||||
- template: templates/matrix.yml
|
- template: templates/matrix.yml
|
||||||
parameters:
|
parameters:
|
||||||
|
container: legacy
|
||||||
nameFormat: "{0}"
|
nameFormat: "{0}"
|
||||||
testFormat: 2.16/{0}
|
testFormat: 2.16/{0}
|
||||||
targets:
|
targets:
|
||||||
@@ -237,6 +240,7 @@ stages:
|
|||||||
jobs:
|
jobs:
|
||||||
- template: templates/matrix.yml
|
- template: templates/matrix.yml
|
||||||
parameters:
|
parameters:
|
||||||
|
container: legacy
|
||||||
testFormat: 2.17/linux/{0}/1
|
testFormat: 2.17/linux/{0}/1
|
||||||
targets:
|
targets:
|
||||||
- name: Fedora 39
|
- name: Fedora 39
|
||||||
@@ -250,6 +254,7 @@ stages:
|
|||||||
jobs:
|
jobs:
|
||||||
- template: templates/matrix.yml
|
- template: templates/matrix.yml
|
||||||
parameters:
|
parameters:
|
||||||
|
container: legacy
|
||||||
testFormat: 2.16/linux/{0}/1
|
testFormat: 2.16/linux/{0}/1
|
||||||
targets:
|
targets:
|
||||||
- name: Fedora 38
|
- name: Fedora 38
|
||||||
@@ -347,6 +352,7 @@ stages:
|
|||||||
jobs:
|
jobs:
|
||||||
- template: templates/matrix.yml
|
- template: templates/matrix.yml
|
||||||
parameters:
|
parameters:
|
||||||
|
container: legacy
|
||||||
testFormat: 2.17/{0}/1
|
testFormat: 2.17/{0}/1
|
||||||
targets:
|
targets:
|
||||||
- name: RHEL 10.0
|
- name: RHEL 10.0
|
||||||
@@ -360,6 +366,7 @@ stages:
|
|||||||
jobs:
|
jobs:
|
||||||
- template: templates/matrix.yml
|
- template: templates/matrix.yml
|
||||||
parameters:
|
parameters:
|
||||||
|
container: legacy
|
||||||
testFormat: 2.16/{0}/1
|
testFormat: 2.16/{0}/1
|
||||||
targets:
|
targets:
|
||||||
- name: RHEL 10.1
|
- name: RHEL 10.1
|
||||||
|
|||||||
@@ -14,6 +14,12 @@ parameters:
|
|||||||
type: object
|
type: object
|
||||||
default: []
|
default: []
|
||||||
|
|
||||||
|
# An optional container resource name to use for the test jobs.
|
||||||
|
# Defaults to "default" if not specified.
|
||||||
|
- name: container
|
||||||
|
type: string
|
||||||
|
default: default
|
||||||
|
|
||||||
# An optional format string used to generate the job name.
|
# An optional format string used to generate the job name.
|
||||||
# - {0} is the name of an item in the targets list.
|
# - {0} is the name of an item in the targets list.
|
||||||
- name: nameFormat
|
- name: nameFormat
|
||||||
@@ -43,6 +49,7 @@ parameters:
|
|||||||
jobs:
|
jobs:
|
||||||
- template: test.yml
|
- template: test.yml
|
||||||
parameters:
|
parameters:
|
||||||
|
container: ${{ parameters.container }}
|
||||||
jobs:
|
jobs:
|
||||||
- ${{ if eq(length(parameters.groups), 0) }}:
|
- ${{ if eq(length(parameters.groups), 0) }}:
|
||||||
- ${{ each target in parameters.targets }}:
|
- ${{ each target in parameters.targets }}:
|
||||||
|
|||||||
@@ -7,11 +7,17 @@ parameters:
|
|||||||
- name: jobs
|
- name: jobs
|
||||||
type: object
|
type: object
|
||||||
|
|
||||||
|
# An optional container resource name to use for the test jobs.
|
||||||
|
# Defaults to "default" if not specified.
|
||||||
|
- name: container
|
||||||
|
type: string
|
||||||
|
default: default
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- ${{ each job in parameters.jobs }}:
|
- ${{ each job in parameters.jobs }}:
|
||||||
- job: test_${{ replace(replace(replace(job.test, '/', '_'), '.', '_'), '-', '_') }}
|
- job: test_${{ replace(replace(replace(job.test, '/', '_'), '.', '_'), '-', '_') }}
|
||||||
displayName: ${{ job.name }}
|
displayName: ${{ job.name }}
|
||||||
container: default
|
container: ${{ parameters.container }}
|
||||||
workspace:
|
workspace:
|
||||||
clean: all
|
clean: all
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
3
changelogs/fragments/643-sysctl-docs.yml
Normal file
3
changelogs/fragments/643-sysctl-docs.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
trivial:
|
||||||
|
- sysctl - added the attributes section to the module documentation to reflect check_mode support (https://github.com/ansible-collections/ansible.posix/issues/643).
|
||||||
3
changelogs/fragments/751_ci_test_container_update.yml
Normal file
3
changelogs/fragments/751_ci_test_container_update.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
trivial:
|
||||||
|
- Update Azure Pipelines test container to 8.0.0 and use legacy container for ansible-core 2.16/2.17.
|
||||||
3
changelogs/fragments/freebsd_sysctl.yml
Normal file
3
changelogs/fragments/freebsd_sysctl.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
bugfixes:
|
||||||
|
- sysctl - reload sysctl only if the sysctl file is ``/etc/sysctl.conf`` or ``/etc/sysctl.conf.local`` (https://github.com/ansible-collections/ansible.posix/issues/663).
|
||||||
@@ -121,8 +121,8 @@ EXAMPLES = r'''
|
|||||||
ansible.posix.authorized_key:
|
ansible.posix.authorized_key:
|
||||||
user: deploy
|
user: deploy
|
||||||
state: present
|
state: present
|
||||||
key: '{{ item }}'
|
key: "{{ lookup('file', item) }}"
|
||||||
with_file:
|
loop:
|
||||||
- public_keys/doe-jane
|
- public_keys/doe-jane
|
||||||
- public_keys/doe-john
|
- public_keys/doe-john
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ options:
|
|||||||
- If V(true), performs a C(/sbin/sysctl -p) if the O(sysctl_file) is
|
- If V(true), performs a C(/sbin/sysctl -p) if the O(sysctl_file) is
|
||||||
updated. If V(false), does not reload C(sysctl) even if the
|
updated. If V(false), does not reload C(sysctl) even if the
|
||||||
O(sysctl_file) is updated.
|
O(sysctl_file) is updated.
|
||||||
|
- For FreeBSD, can not be used with O(sysctl_file) other than C(/etc/sysctl.conf) or C(/etc/sysctl.conf.local).
|
||||||
type: bool
|
type: bool
|
||||||
default: true
|
default: true
|
||||||
sysctl_file:
|
sysctl_file:
|
||||||
@@ -56,6 +57,17 @@ options:
|
|||||||
- Verify token value with the sysctl command and set with C(-w) if necessary.
|
- Verify token value with the sysctl command and set with C(-w) if necessary.
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
|
attributes:
|
||||||
|
check_mode:
|
||||||
|
support: full
|
||||||
|
description: Can run in check_mode and return changed status prediction without modifying target.
|
||||||
|
diff_mode:
|
||||||
|
support: none
|
||||||
|
description: Does not support differences output.
|
||||||
|
platform:
|
||||||
|
platforms: posix
|
||||||
|
support: full
|
||||||
|
description: Supported on POSIX-compliant systems.
|
||||||
author:
|
author:
|
||||||
- David CHANIAL (@davixx)
|
- David CHANIAL (@davixx)
|
||||||
'''
|
'''
|
||||||
@@ -155,6 +167,11 @@ class SysctlModule(object):
|
|||||||
|
|
||||||
self.platform = platform.system().lower()
|
self.platform = platform.system().lower()
|
||||||
|
|
||||||
|
# system specific tests
|
||||||
|
freebsd_sysctl_files = ['/etc/sysctl.conf', '/etc/sysctl.conf.local']
|
||||||
|
if self.platform == 'freebsd' and self.sysctl_file not in freebsd_sysctl_files and self.args['reload']:
|
||||||
|
self.module.fail_json(msg="%s can not be reloaded. Set reload=False." % self.sysctl_file)
|
||||||
|
|
||||||
# Whitespace is bad
|
# Whitespace is bad
|
||||||
self.args['name'] = self.args['name'].strip()
|
self.args['name'] = self.args['name'].strip()
|
||||||
self.args['value'] = self._parse_value(self.args['value'])
|
self.args['value'] = self._parse_value(self.args['value'])
|
||||||
|
|||||||
Reference in New Issue
Block a user