From: Andreas Gerler Date: Tue, 25 Nov 2025 18:34:14 +0000 (+0100) Subject: install ansible X-Git-Url: http://git.bundesbrandschatzamt.de/?a=commitdiff_plain;h=80423d93c7f83f61061c4199de2da0dda3ad2fc7;p=emacsconfig.git install ansible * elpa/ansible-20250613.2354 --- diff --git a/elpa/ansible-20250613.2354/ansible-autoloads.el b/elpa/ansible-20250613.2354/ansible-autoloads.el new file mode 100644 index 00000000..3a6d985a --- /dev/null +++ b/elpa/ansible-20250613.2354/ansible-autoloads.el @@ -0,0 +1,50 @@ +;;; ansible-autoloads.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*- +;; Generated by the `loaddefs-generate' function. + +;; This file is part of GNU Emacs. + +;;; Code: + +(add-to-list 'load-path (or (and load-file-name (directory-file-name (file-name-directory load-file-name))) (car load-path))) + + + +;;; Generated autoloads from ansible.el + +(defvar ansible-key-map (make-sparse-keymap) "\ +Keymap for Ansible.") +(autoload 'ansible-mode "ansible" "\ +Ansible minor mode. + +This is a minor mode. If called interactively, toggle the `Ansible +mode' mode. If the prefix argument is positive, enable the mode, and if +it is zero or negative, disable the mode. + +If called from Lisp, toggle the mode if ARG is `toggle'. Enable the +mode if ARG is nil, omitted, or is a positive number. Disable the mode +if ARG is a negative number. + +To check whether the minor mode is enabled in the current buffer, +evaluate the variable `ansible-mode'. + +The mode's hook is called both when the mode is enabled and when it is +disabled. + +(fn &optional ARG)" t) +(autoload 'ansible-dict-initialize "ansible" "\ +Initialize Ansible auto-complete.") +(register-definition-prefixes "ansible" '("ansible-")) + +;;; End of scraped data + +(provide 'ansible-autoloads) + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; no-native-compile: t +;; coding: utf-8-emacs-unix +;; End: + +;;; ansible-autoloads.el ends here diff --git a/elpa/ansible-20250613.2354/ansible-pkg.el b/elpa/ansible-20250613.2354/ansible-pkg.el new file mode 100644 index 00000000..c12f235e --- /dev/null +++ b/elpa/ansible-20250613.2354/ansible-pkg.el @@ -0,0 +1,13 @@ +;; -*- no-byte-compile: t; lexical-binding: nil -*- +(define-package "ansible" "20250613.2354" + "Ansible minor mode." + '((s "1.9.0") + (f "0.16.2") + (emacs "25.1")) + :url "https://gitlab.com/emacs-ansible/emacs-ansible" + :commit "7385222a4f209eca6d72d412c03da99097e2755f" + :revdesc "7385222a4f20" + :authors '((nil . "k1lowxb[at]gmail[dot]com") + (nil . "k1low[at]101000lab[dot]org")) + :maintainers '((nil . "k1lowxb[at]gmail[dot]com") + (nil . "k1low[at]101000lab[dot]org"))) diff --git a/elpa/ansible-20250613.2354/ansible.el b/elpa/ansible-20250613.2354/ansible.el new file mode 100644 index 00000000..8366624a --- /dev/null +++ b/elpa/ansible-20250613.2354/ansible.el @@ -0,0 +1,560 @@ +;;; ansible.el --- Ansible minor mode -*- lexical-binding: t -*- + +;; Copyright (C) 2014 by 101000code/101000LAB +;; Copyright (C) 2024 by Mark A. Hershberger + +;; This program 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 2 of the License, or +;; (at your option) any later version. + +;; This program 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 this program; if not, write to the Free Software +;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +;; Package-Version: 20250613.2354 +;; Package-Revision: 7385222a4f20 +;; Author: k1LoW (Kenichirou Oyama), +;; +;; Updates: Mark A. Hershberger, +;; URL: https://gitlab.com/emacs-ansible/emacs-ansible +;; Package-Requires: ((s "1.9.0") (f "0.16.2") (emacs "25.1")) + +;;; Install +;; Put this file into load-path'ed directory, and byte compile it if +;; desired. And put the following expression into your ~/.emacs. +;; +;; (require 'ansible) + +;;; Commentary: +;; This is minor-mode for editing ansible files. + +;;; Commands: +;; +;; Below are complete command list: +;; +;; `ansible-mode' +;; Ansible minor mode. +;; +;;; Customizable Options: +;; +;; Below are customizable option list: +;; +;; `ansible-dir-search-limit' +;; Search limit +;; default = 5 + +;;; Code: + +;;require +(require 's) +(require 'f) +(require 'cl-lib) +(require 'easy-mmode) +(require 'yasnippet nil t) + +(defgroup ansible nil + "Ansible minor mode." + :group 'languages + :prefix "ansible-") + +(defcustom ansible-dir-search-limit 5 + "Search limit." + :type 'integer + :group 'ansible) + +(defcustom ansible-vault-password-file "~/.vault_pass.txt" + "Filename containing `ansible-vault` password." + :type 'file + :group 'ansible) + +(defcustom ansible-vault-password-environment-variable "VAULT_PASSWORD" + "Environment variable containing `ansible-vault` password." + :type 'string + :group 'ansible) + +(defcustom ansible-vault-password 'file + "Password for `ansible-vault'. +This can be a file path (from `ansible-vault-password-file') or a function." + :type '(choice + (const + :tag "Use the contents of the file `ansible-vault-password-file`" file) + (const + :tag "Prompt for a password" + :value ansible-vault-prompt-for-password) + (const + :tag "Use the contents of the environment variable `ansible-vault-password-environment-variable`" + :value ansible-vault-password-from-environment) + (function + :tag "Function"))) + +(defconst ansible-dir (file-name-directory (or load-file-name + buffer-file-name))) + +(defconst ansible-snip-dir (expand-file-name "snippets" ansible-dir)) + +;;;###autoload +(defvar ansible-key-map + (make-sparse-keymap) + "Keymap for Ansible.") + +(defvar ansible-vault-store-cleanup-file nil + "Any temp file that need to be cleaned up after ansible has run.") + +(defvar ansible-root-path nil + "Ansible spec directory path.") + +(defvar ansible-hook nil + "Hook.") + +(defvar ansible-section-face 'ansible-section-face) +(defface ansible-section-face + '((((class color) (min-colors 88) (background dark)) + :foreground "indian red" )) + "Face for ansible first level section names in playbooks. +Used for vars, tasks, handlers, etc." + :group 'ansible) + +(defvar ansible-task-label-face 'ansible-task-label-face) +(defface ansible-task-label-face + '((((class color) (min-colors 88) (background dark)) :foreground "green" )) + "Face for ansible task names in playbooks." + :group 'ansible) + +(defconst ansible-section-keywords-regex + (concat + "^ *-? " + (regexp-opt + '("environment" "handlers" "hosts" "import_tasks" "include" "include_tasks" + "post_tasks" "pre_tasks" "role" "roles" "tasks" "vars" "vars_files" + "vars_prompt") + t) + ":") + "Special keywords used to identify toplevel information in a playbook.") + +(defconst ansible-task-keywords-regex + (concat + "^ *-? " + (regexp-opt + '("a10_server" "a10_service_group" "a10_virtual_server" "acl" "add_host" + "airbrake_deployment" "alternatives" "apache2_module" "apk" "apt" + "apt_key" "apt_repository" "apt_rpm" "assemble" "assert" "async_status" + "at" "authorized_key" "azure" "azure_rm_deployment" + "azure_rm_networkinterface" "azure_rm_networkinterface_facts" + "azure_rm_publicipaddress" "azure_rm_publicipaddress_facts" + "azure_rm_resourcegroup" "azure_rm_resourcegroup_facts" + "azure_rm_securitygroup" "azure_rm_securitygroup_facts" + "azure_rm_storageaccount" "azure_rm_storageaccount_facts" + "azure_rm_storageblob" "azure_rm_subnet" "azure_rm_virtualmachine" + "azure_rm_virtualmachineimage_facts" "azure_rm_virtualnetwork" + "azure_rm_virtualnetwork_facts" "bigip_facts" "bigip_gtm_wide_ip" + "bigip_monitor_http" "bigip_monitor_tcp" "bigip_node" "bigip_pool" + "bigip_pool_member" "bigip_virtual_server" "bigpanda" "blockinfile" + "boundary_meter" "bower" "bundler" "bzr" "campfire" "capabilities" + "circonus_annotation" "cl_bond" "cl_bridge" "cl_img_install" + "cl_interface" "cl_interface_policy" "cl_license" "cl_ports" + "clc_aa_policy" "clc_alert_policy" "clc_blueprint_package" + "clc_firewall_policy" "clc_group" "clc_loadbalancer" "clc_modify_server" + "clc_publicip" "clc_server" "clc_server_snapshot" "cloudflare_dns" + "cloudformation" "cloudtrail" "command" "composer" "consul" "consul_acl" + "consul_kv" "consul_session" "copy" "cpanm" "cron" "cronvar" "crypttab" + "cs_account" "cs_affinitygroup" "cs_cluster" "cs_configuration" + "cs_domain" "cs_facts" "cs_firewall" "cs_instance" "cs_instance_facts" + "cs_instancegroup" "cs_ip_address" "cs_iso" "cs_loadbalancer_rule" + "cs_loadbalancer_rule_member" "cs_network" "cs_pod" "cs_portforward" + "cs_project" "cs_resourcelimit" "cs_securitygroup" "cs_securitygroup_rule" + "cs_sshkeypair" "cs_staticnat" "cs_template" "cs_user" "cs_vmsnapshot" + "cs_volume" "cs_zone" "cs_zone_facts" "datadog_event" "datadog_monitor" + "debconf" "debug" "deploy_helper" "digital_ocean" "digital_ocean_domain" + "digital_ocean_sshkey" "django_manage" "dnf" "dnsimple" "dnsmadeeasy" + "docker" "docker_container" "docker_image" "docker_image_facts" + "docker_login" "docker_service" "dpkg_selections" "dynamodb_table" + "easy_install" "ec2" "ec2_ami" "ec2_ami_copy" "ec2_ami_find" "ec2_asg" + "ec2_eip" "ec2_elb" "ec2_elb_facts" "ec2_elb_lb" "ec2_eni" "ec2_eni_facts" + "ec2_facts" "ec2_group" "ec2_instance" "ec2_instance_info" "ec2_key" + "ec2_lc" "ec2_metric_alarm" "ec2_remote_facts" "ec2_scaling_policy" + "ec2_snapshot" "ec2_snapshot_facts" "ec2_tag" "ec2_vol" "ec2_vol_facts" + "ec2_vpc" "ec2_vpc_dhcp_options" "ec2_vpc_igw" "ec2_vpc_net" + "ec2_vpc_net_facts" "ec2_vpc_route_table" "ec2_vpc_route_table_facts" + "ec2_vpc_subnet" "ec2_vpc_subnet_facts" "ec2_win_password" "ecs_cluster" + "ecs_service" "ecs_service_facts" "ecs_task" "ecs_taskdefinition" + "ejabberd_user" "elasticache" "elasticache_subnet_group" + "elasticsearch_plugin" "eos_command" "eos_config" "eos_eapi" + "eos_template" "expect" "facter" "fail" "fetch" "file" "filesystem" "find" + "firewalld" "flowdock" "gc_storage" "gce" "gce_img" "gce_lb" "gce_net" + "gce_pd" "gce_tag" "gem" "get_url" "getent" "git" "git_config" + "github_hooks" "gitlab_group" "gitlab_project" "gitlab_user" + "gluster_volume" "group" "group_by" "grove" "hall" "haproxy" "hg" + "hipchat" "homebrew" "homebrew_cask" "homebrew_tap" "hostname" "htpasswd" + "iam" "iam_cert" "iam_policy" "include_vars" "influxdb_database" + "influxdb_retention_policy" "ini_file" "ios_command" "ios_config" + "ios_template" "iosxr_command" "iosxr_config" "iosxr_template" + "ipify_facts" "iptables" "irc" "jabber" "jboss" "jira" "junos_command" + "junos_config" "junos_facts" "junos_netconf" "junos_package" + "junos_template" "kernel_blacklist" "known_hosts" "kubernetes" "layman" + "librato_annotation" "lineinfile" "linode" "lldp" "locale_gen" + "logentries" "lvg" "lvol" "lxc_container" "macports" "mail" "make" + "maven_artifact" "modprobe" "mongodb_parameter" "mongodb_user" "monit" + "mount" "mqtt" "mysql_db" "mysql_replication" "mysql_user" + "mysql_variables" "nagios" "netscaler" "newrelic_deployment" "nexmo" + "nmcli" "npm" "nxos_command" "nxos_config" "nxos_facts" "nxos_feature" + "nxos_interface" "nxos_ip_interface" "nxos_nxapi" "nxos_ping" + "nxos_switchport" "nxos_template" "nxos_vlan" "nxos_vrf" + "nxos_vrf_interface" "nxos_vrrp" "ohai" "open_iscsi" "openbsd_pkg" + "openvswitch_bridge" "openvswitch_db" "openvswitch_port" "opkg" + "ops_command" "ops_config" "ops_facts" "ops_template" "os_auth" + "os_client_config" "os_flavor_facts" "os_floating_ip" "os_group" + "os_image" "os_image_facts" "os_ironic" "os_ironic_inspect" + "os_ironic_node" "os_keypair" "os_keystone_domain" + "os_keystone_domain_facts" "os_keystone_role" "os_network" + "os_networks_facts" "os_nova_flavor" "os_object" "os_port" "os_port_facts" + "os_project" "os_project_facts" "os_router" "os_security_group" + "os_security_group_rule" "os_server" "os_server_actions" "os_server_facts" + "os_server_volume" "os_subnet" "os_subnets_facts" "os_user" + "os_user_facts" "os_user_group" "os_user_role" "os_volume" "osx_defaults" + "osx_say" "ovirt" "package" "pacman" "pagerduty" "pagerduty_alert" + "pam_limits" "patch" "pause" "pear" "ping" "pingdom" "pip" "pkg5" + "pkg5_publisher" "pkgin" "pkgng" "pkgutil" "portage" "portinstall" + "postgresql_db" "postgresql_ext" "postgresql_lang" "postgresql_privs" + "postgresql_user" "profitbricks" "profitbricks_datacenter" + "profitbricks_nic" "profitbricks_volume" "profitbricks_volume_attachments" + "proxmox" "proxmox_template" "puppet" "pushbullet" "pushover" + "rabbitmq_binding" "rabbitmq_exchange" "rabbitmq_parameter" + "rabbitmq_plugin" "rabbitmq_policy" "rabbitmq_queue" "rabbitmq_user" + "rabbitmq_vhost" "raw" "rax" "rax_cbs" "rax_cbs_attachments" "rax_cdb" + "rax_cdb_database" "rax_cdb_user" "rax_clb" "rax_clb_nodes" "rax_clb_ssl" + "rax_dns" "rax_dns_record" "rax_facts" "rax_files" "rax_files_objects" + "rax_identity" "rax_keypair" "rax_meta" "rax_mon_alarm" "rax_mon_check" + "rax_mon_entity" "rax_mon_notification" "rax_mon_notification_plan" + "rax_network" "rax_queue" "rax_scaling_group" "rax_scaling_policy" "rds" + "rds_param_group" "rds_subnet_group" "redhat_subscription" "redis" + "replace" "rhn_channel" "rhn_register" "riak" "rollbar_deployment" + "route53" "route53_facts" "route53_health_check" "route53_zone" "rpm_key" + "s3" "s3_bucket" "s3_lifecycle" "s3_logging" "script" "seboolean" + "selinux" "selinux_permissive" "sendgrid" "sensu_check" "seport" "service" + "set_fact" "setup" "shell" "sl_vm" "slack" "slackpkg" "slurp" "snmp_facts" + "sns" "sns_topic" "solaris_zone" "sqs_queue" "stackdriver" "stat" + "sts_assume_role" "subversion" "supervisorctl" "svc" "svr4pkg" "swdepot" + "synchronize" "sysctl" "systemd" "taiga_issue" "template" "twilio" + "typetalk" "ufw" "unarchive" "uptimerobot" "uri" "urpmi" "user" "vca_fw" + "vca_nat" "vca_vapp" "vertica_configuration" "vertica_facts" + "vertica_role" "vertica_schema" "vertica_user" "virt" "virt_net" + "virt_pool" "vmware_cluster" "vmware_datacenter" "vmware_dns_config" + "vmware_dvs_host" "vmware_dvs_portgroup" "vmware_dvswitch" "vmware_host" + "vmware_maintenancemode" "vmware_migrate_vmk" "vmware_portgroup" + "vmware_target_canonical_facts" "vmware_vm_facts" "vmware_vm_shell" + "vmware_vm_vss_dvs_migrate" "vmware_vmkernel" "vmware_vmkernel_ip_config" + "vmware_vsan_cluster" "vmware_vswitch" "vsphere_copy" "vsphere_guest" + "wait_for" "webfaction_app" "webfaction_db" "webfaction_domain" + "webfaction_mailbox" "webfaction_site" "win_acl" "win_acl_inheritance" + "win_chocolatey" "win_copy" "win_dotnet_ngen" "win_environment" + "win_feature" "win_file" "win_file_version" "win_firewall_rule" + "win_get_url" "win_group" "win_iis_virtualdirectory" + "win_iis_webapplication" "win_iis_webapppool" "win_iis_webbinding" + "win_iis_website" "win_lineinfile" "win_msi" "win_nssm" "win_owner" + "win_package" "win_ping" "win_reboot" "win_regedit" "win_regmerge" + "win_scheduled_task" "win_service" "win_share" "win_stat" "win_template" + "win_timezone" "win_unzip" "win_updates" "win_uri" "win_user" + "win_webpicmd" "xattr" "xenserver_facts" "yum" "yum_repository" + "zabbix_group" "zabbix_host" "zabbix_hostmacro" "zabbix_maintenance" + "zabbix_screen" "zfs" "znode" "zypper" "zypper_repository") + t) + ":") + "List of ansible task names.") + +(defconst ansible-keywords-regex + (concat + "^ +" + (regexp-opt + '("args" "become" "become_user" "connection" "delay" "delegate_to" + "gather_facts" "local_action" "notify" "register" "retries" "strategy" + "tags" "tags" "until" "when" "with_dict" "with_fileglob" + "with_first_found" "with_flattened" "with_indexed_items" "with_ini" + "with_inventory_hostnames" "with_items" "with_lines" "with_nested" + "with_random_choice" "with_sequence" "with_subelements" "with_together") + t) + ":") + "Ansible keywords used with tasks.") + + +(defvar ansible-playbook-font-lock +`((,ansible-section-keywords-regex (1 ansible-section-face t)) + (,ansible-task-keywords-regex (1 font-lock-keyword-face t)) + (,ansible-keywords-regex (1 font-lock-builtin-face t)) + ("^ *- \\(name\\):\\([^#\n]*\\)" + (1 font-lock-builtin-face t) + (2 ansible-task-label-face t)) + ("\\({{\\)\\([^}]+\\)\\(}}\\)" + (1 font-lock-builtin-face t) + (2 font-lock-function-name-face t) + (3 font-lock-builtin-face t)) + ("\\({%\\)\\([^}]+\\)\\(%}\\)" + (1 font-lock-builtin-face t) + (2 font-lock-function-name-face t) + (3 font-lock-builtin-face t)) + ("\\({#\\)\\([^}]+\\)\\(#}\\)" + (1 font-lock-comment-delimiter-face t) + (2 font-lock-comment-face t) + (3 font-lock-comment-delimiter-face t))) + "Font lock definitions for ansible playbooks.") + + +(defun ansible-vault-create-temp-password-file (password) + "Create a temporary password file from PASSWORD. +Returns the `ansible-vault` args for the password file." + (let ((temp-file (make-temp-file "ansible-vault-pass"))) + (write-region password nil temp-file) + (setq ansible-vault-store-cleanup-file temp-file) + (format "--vault-password-file=%s" temp-file))) + +(defun ansible-vault-prompt-for-password () + "Prompt for an Ansible vault password, store it in a temporary file. +Returns the `ansible-vault` args for the password file." + (let ((pass (read-passwd "Vault Password: "))) + (ansible-vault-create-temp-password-file pass))) + +(defun ansible-vault-password-from-environment () + "Temporarily store the password from the environment in a file. +Returns the `ansible-vault` args for the password file." + (let ((pass (getenv ansible-vault-password-environment-variable))) + (ansible-vault-create-temp-password-file pass))) + +(defun ansible-add-font-lock () + "Extend YAML with syntax highlight for ansible playbooks." + (interactive) + (font-lock-add-keywords 'nil ansible-playbook-font-lock 'append) + (font-lock-flush)) + +(defun ansible-remove-font-lock () + "Add syntax highlight to ansible playbooks." + (interactive) + (font-lock-remove-keywords 'nil ansible-playbook-font-lock) + (font-lock-flush)) + +(defun ansible-maybe-unload-snippets (&optional buffer-count) + "Unload ansible snippets in case no other ansible buffers exists. +If BUFFER-COUNT is passed and is > 1, then skip unloading." + ;; mitigates: https://github.com/k1LoW/emacs-ansible/issues/5 + (when (and (featurep 'yasnippet) + ;; when called via kill-hook, the buffer is still existent + (= (or buffer-count 1) + (seq-count (lambda (b) + (with-current-buffer b ansible-mode)) + (buffer-list)))) + (setq yas-snippet-dirs (delete ansible-snip-dir yas-snippet-dirs)) + (yas-reload-all))) + +;;;###autoload +(define-minor-mode ansible-mode + "Ansible minor mode." + :lighter " Ansible" + :group 'ansible + (if ansible-mode + (progn + (setq minor-mode-map-alist + (cons (cons 'ansible ansible-key-map) + minor-mode-map-alist)) + (ansible-dict-initialize) + (ansible-remove-font-lock) + (ansible-add-font-lock) + (when (featurep 'yasnippet) + (add-to-list 'yas-snippet-dirs ansible-snip-dir t) + (yas-load-directory ansible-snip-dir)) + (add-hook 'kill-buffer-hook #'ansible-maybe-unload-snippets nil t) + (run-hooks 'ansible-hook)) + (ansible-remove-font-lock) + (ansible-maybe-unload-snippets 0))) + +;; Aliases for the old non-standard "ansible" mode name +(define-obsolete-function-alias 'ansible 'ansible-mode "2024-11-28") +(with-no-warnings + (define-obsolete-variable-alias 'ansible 'ansible-mode "2024-11-28")) + +(defun ansible-update-root-path () + "Update `ansible-root-path'." + (let ((spec-path (ansible-find-root-path))) + (unless (not spec-path) + (setq ansible-root-path spec-path)) + (when ansible-root-path t))) + +(defun ansible-find-root-path () + "Find ansible directory." + (let ((current-dir (f-expand default-directory))) + (cl-loop with count = 0 + until (f-exists? (f-join current-dir "roles")) + ;; Return nil if outside the value of + if (= count ansible-dir-search-limit) + do (cl-return nil) + ;; Or search upper directories. + else + do (cl-incf count) + (unless (f-root? current-dir) + (setq current-dir (f-dirname current-dir))) + finally return current-dir))) + +(defun ansible-list-playbooks () + "Find .yml files in `ansible-root-path`." + (if (ansible-update-root-path) + (mapcar + (lambda (file) (f-relative file ansible-root-path)) + (f-files ansible-root-path (lambda (file) + (s-matches? ".yml" (f-long file))) + t)) + nil)) + +(defun ansible-vault-get-password () + "Retrieve the password based on the value of `ansible-vault-password'." + (cond + ((functionp ansible-vault-password) + (funcall ansible-vault-password)) + ((eq ansible-vault-password 'file) + (format "--vault-password-file=%s" + (expand-file-name ansible-vault-password-file))) + (t + (error "Invalid ansible-vault-password value")))) + +(defun ansible-vault (mode str param-str) + "Execute `ansible-vault` MODE on STR with the given PARAM-STR. + +MODE is `encrypt' or `decrypt'. + +STR is the string to be handled. + +PARAM-STR is produced by `ansible-vault-string' and is meant to be an +empty string or `--vault-password-file ...'. + +If the first line of STR is indented with whitespace, only those lines +in STR that match that whitespace will be handled by `ansible-vault MODE'. +The rest will be untouched. + +The string that results will be returned. + +See the man page `ansible-vault(1)' for more details." + (let* ((temp-file (make-temp-file "ansible-vault-ansible")) + (lines (split-string str "\n")) + (first-line (car lines)) + (first-line-prefix (if (string-match "^[ \t]*" first-line) + (match-string 0 first-line) + "")) + (same-indent-lines (cl-loop for line in lines + while (string-prefix-p first-line-prefix line) + collect line)) + (rest-lines (nthcdr (length same-indent-lines) lines)) + (cleaned-same-indent-lines + (mapconcat (lambda (line) + (replace-regexp-in-string + (format "^%s" (regexp-quote first-line-prefix)) + "" line)) + same-indent-lines + "\n"))) + (write-region cleaned-same-indent-lines nil temp-file 'append) + (let* ((vault-str (or param-str "")) + (command (format "ansible-vault %s %s %s" + mode vault-str temp-file)) + (status (shell-command command)) + (output (string-trim-right (f-read-text temp-file)))) + (if (/= status 0) + (error "Error in `ansible-vault` running %s!" command) + (delete-file temp-file) + (concat (mapconcat + (lambda (line) (concat first-line-prefix line)) + (split-string output "\n") + "\n") + (when rest-lines + (concat "\n" (mapconcat 'identity rest-lines "\n")))))))) + +(defun ansible-vault-string (mode str) + "Do `ansible-vault' MODE on STR and return result. +MODE should be one of `decrypt' or `encrypt'." + (if (or (string-equal "decrypt" mode) (string-equal "encrypt" mode)) + (let ((output (ansible-vault mode str (ansible-vault-get-password)))) + + ;; Clean up any temp password file ansible-vault-get-password may have + ;; produced. + (when (and (stringp ansible-vault-store-cleanup-file) + (file-exists-p ansible-vault-store-cleanup-file)) + (delete-file ansible-vault-store-cleanup-file) + (setq ansible-vault-store-cleanup-file nil)) + + output) + (error "MODE should be one of 'encrypt' or 'decrypt'"))) + +(defun ansible-decrypt-buffer () + "Decrypt current buffer." + (interactive) + (ansible-vault-buffer "decrypt") + ;; force buffer to be marked as unmodified + (set-buffer-modified-p nil)) + +(defun ansible-encrypt-buffer () + "Encrypt current buffer." + (interactive) + (if (buffer-modified-p) + (ansible-vault-buffer "encrypt") + (revert-buffer t t))) + +(defun ansible-vault-buffer (mode) + "Execute `ansible-vault' MODE and update current buffer." + (ansible-vault-region mode (point-min) (point-max))) + +(defun ansible-vault-region (mode start end) + "Execute `ansible-vault' MODE from START to END and update the region." + (let ((output (ansible-vault-string mode (buffer-substring-no-properties start end)))) + (delete-region start end) + (insert output))) + +(defun ansible-decrypt-region (start end) + "Decrypt from START to END (current region)." + (interactive "r") + (ansible-vault-region "decrypt" start end) + ;; force buffer to be marked as unmodified + (set-buffer-modified-p nil)) + +(defun ansible-encrypt-region (start end) + "Encrypt from START to END (current region)." + (interactive "r") + (ansible-vault-region "encrypt" start end)) + +(defun ansible-auto-decrypt-encrypt () + "Decrypt current buffer if it is a vault encrypted file. +Also, automatically encrypts the file before saving the buffer." + (let ((vault-file? (string-match-p + "\$ANSIBLE_VAULT;[0-9]+\.[0-9]+" + (buffer-substring-no-properties + (point-min) (point-max))))) + (when vault-file? + (condition-case _ + (progn + (ansible-decrypt-buffer) + (add-hook 'before-save-hook 'ansible-encrypt-buffer nil t) + (add-hook 'after-save-hook 'ansible-decrypt-buffer nil t)) + (error + (message + (concat "Could not decrypt file. Make sure " + "`ansible-vault-password-file' or the environment variable " + "ANSIBLE_VAULT_PASSWORD_FILE is correctly set"))))))) + +;;;###autoload +(defun ansible-dict-initialize () + "Initialize Ansible auto-complete." + (let ((dict-dir (expand-file-name "dict" ansible-dir))) + (when (and (f-directory? dict-dir) (boundp 'ac-user-dictionary-files)) + (add-to-list 'ac-user-dictionary-files (f-join dict-dir "ansible") t)))) + +;;;###ansible-lint +(defun ansible-lint-errors () + "Replace make -k with ansible-lint, with an UTF-8 locale to avoid crashes." + (make-local-variable 'compile-command) + (let ((ansiblelint_command "ansible-lint ") (loc "LANG=C.UTF-8 ")) + (setq compile-command (concat loc ansiblelint_command buffer-file-name)))) + +(add-hook 'ansible-hook 'ansible-lint-errors) + +(provide 'ansible) + +;;; ansible.el ends here diff --git a/elpa/ansible-20250613.2354/dict/ansible b/elpa/ansible-20250613.2354/dict/ansible new file mode 100644 index 00000000..b17b852e --- /dev/null +++ b/elpa/ansible-20250613.2354/dict/ansible @@ -0,0 +1,432 @@ +name +groups +state +update_cache +update_cache_retries +update_cache_retry_max_delay +cache_valid_time +purge +default_release +install_recommends +force +clean +allow_unauthenticated +allow_downgrade +allow_change_held_packages +upgrade +dpkg_options +deb +autoremove +autoclean +policy_rc_d +only_upgrade +fail_on_autoremove +force_apt_get +lock_timeout +id +data +file +keyring +url +keyserver +validate_certs +repo +mode +filename +codename +install_python_apt +src +dest +backup +delimiter +remote_src +regexp +ignore_hidden +validate +that +fail_msg +success_msg +quiet +jid +path +marker +block +insertafter +insertbefore +create +marker_begin +marker_end +append_newline +prepend_newline +expand_argument_vars +free_form +cmd +argv +creates +removes +chdir +stdin +stdin_add_newline +strip_empty_ends +content +directory_mode +follow +local_follow +checksum +user +job +cron_file +minute +hour +day +month +weekday +special_time +disabled +env +allow_downgrade_to_insecure +allow_insecure +allow_weak +architectures +by_hash +check_date +check_valid_until +components +date_max_future +enabled +inrelease_path +languages +pdiffs +signed_by +suites +targets +trusted +types +uris +question +vtype +value +unseen +msg +var +verbosity +use_backend +list +enablerepo +disablerepo +conf_file +disable_gpg_check +installroot +releasever +exclude +skip_broken +update_only +security +bugfix +enable_plugin +disable_plugin +disable_excludes +sslverify +install_repoquery +download_only +install_weak_deps +download_dir +allowerasing +nobest +best +cacheonly +selection +command +responses +timeout +echo +fail_on_missing +validate_checksum +flat +recurse +modification_time +modification_time_format +access_time +access_time_format +age +patterns +excludes +contains +read_whole_file +paths +file_type +size +age_stamp +hidden +exact_mode +get_checksum +use_regex +depth +encoding +limit +parallel +ciphers +decompress +tmp_dest +use_proxy +headers +url_username +url_password +force_basic_auth +client_cert +client_key +http_agent +unredirected_headers +use_gssapi +use_netrc +database +key +service +split +fail_key +version +accept_hostkey +accept_newhostkey +ssh_opts +key_file +reference +remote +refspec +clone +update +executable +bare +umask +recursive +single_branch +track_submodules +verify_commit +archive +archive_prefix +separate_git_dir +gpg_allowlist +gid +system +local +non_unique +gid_min +gid_max +parents +use +free-form +tasks_from +vars_from +defaults_from +allow_duplicates +handlers_from +rolespec_validate +public +apply +dir +files_matching +ignore_files +extensions +ignore_unknown_extensions +hash_behaviour +table +action +rule_num +ip_version +chain +protocol +source +destination +tcp_flags +match +jump +gateway +log_prefix +log_level +goto +in_interface +out_interface +fragment +set_counters +source_port +destination_port +destination_ports +to_ports +to_destination +to_source +syn +set_dscp_mark +set_dscp_mark_class +comment +ctstate +src_range +dst_range +match_set +match_set_flags +limit_burst +uid_owner +gid_owner +reject_with +icmp_type +flush +policy +wait +chain_management +numeric +hash_host +search_string +line +backrefs +firstmatch +devices +fstypes +sources +mount_binary +on_timeout +include_aggregate_mounts +manager +strategy +minutes +seconds +prompt +requirements +virtualenv +virtualenv_site_packages +virtualenv_command +virtualenv_python +extra_args +editable +break_system_packages +pre_reboot_delay +post_reboot_delay +reboot_timeout +connect_timeout +test_command +search_paths +boot_time_command +reboot_command +replace +after +before +fingerprint +sleep +pattern +runlevel +arguments +key_value +cacheable +per_host +aggregate +gather_subset +gather_timeout +filter +fact_path +checksum_algorithm +get_mime +get_attributes +revision +in_place +username +password +checkout +export +switch +masked +daemon_reload +daemon_reexec +scope +no_block +runlevels +daemonize +prefix +suffix +copy +io_buffer_size +list_files +include +keep_newer +extra_opts +body +body_format +method +return_content +follow_redirects +status_code +ca_path +unix_socket +uid +seuser +group +append +shell +home +skeleton +create_home +move_home +remove +login_class +generate_ssh_key +ssh_key_bits +ssh_key_type +ssh_key_file +ssh_key_comment +ssh_key_passphrase +update_password +expires +password_lock +profile +authorization +role +password_expire_max +password_expire_min +password_expire_warn +password_expire_account_disable +uid_min +uid_max +argument_spec +provided_arguments +host +delay +port +active_connection_states +search_regex +exclude_hosts +async +bandwidth +baseurl +cost +countme +deltarpm_metadata_percentage +deltarpm_percentage +description +enablegroups +failovermethod +gpgcakey +gpgcheck +gpgkey +module_hotfixes +http_caching +includepkgs +ip_resolve +keepalive +keepcache +metadata_expire +metadata_expire_filter +metalink +mirrorlist +mirrorlist_expire +priority +protect +proxy +proxy_password +proxy_username +repo_gpgcheck +reposdir +retries +s3_enabled +skip_if_unavailable +ssl_check_cert_permissions +sslcacert +sslclientcert +sslclientkey +throttle +ui_repoid_vars \ No newline at end of file diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/add_host b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/add_host new file mode 100644 index 00000000..d0e11afb --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/add_host @@ -0,0 +1,6 @@ +# name : Add a host (and alternatively a group) to the ansible-playbook in-memory inventory +# key : add_host +# condition: ansible +# -- +- name: ${1:Add a host (and alternatively a group) to the ansible-playbook in-memory inventory} + add_host: name=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/apt b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/apt new file mode 100644 index 00000000..e6e0f3ed --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/apt @@ -0,0 +1,6 @@ +# name : Manages apt-packages +# key : apt +# condition: ansible +# -- +- name: ${1:Manages apt-packages} + apt: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/apt_key b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/apt_key new file mode 100644 index 00000000..24383644 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/apt_key @@ -0,0 +1,6 @@ +# name : Add or remove an apt key +# key : apt_key +# condition: ansible +# -- +- name: ${1:Add or remove an apt key} + apt_key: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/apt_repository b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/apt_repository new file mode 100644 index 00000000..d9a1aaa4 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/apt_repository @@ -0,0 +1,6 @@ +# name : Add and remove APT repositories +# key : apt_repository +# condition: ansible +# -- +- name: ${1:Add and remove APT repositories} + apt_repository: repo=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/assemble b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/assemble new file mode 100644 index 00000000..098a65a2 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/assemble @@ -0,0 +1,6 @@ +# name : Assemble configuration files from fragments +# key : assemble +# condition: ansible +# -- +- name: ${1:Assemble configuration files from fragments} + assemble: src=$2 dest=$3 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/assert b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/assert new file mode 100644 index 00000000..6128f90b --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/assert @@ -0,0 +1,6 @@ +# name : Asserts given expressions are true +# key : assert +# condition: ansible +# -- +- name: ${1:Asserts given expressions are true} + assert: that=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/async_status b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/async_status new file mode 100644 index 00000000..119a0de4 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/async_status @@ -0,0 +1,6 @@ +# name : Obtain status of asynchronous task +# key : async_status +# condition: ansible +# -- +- name: ${1:Obtain status of asynchronous task} + async_status: jid=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/blockinfile b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/blockinfile new file mode 100644 index 00000000..7cad7300 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/blockinfile @@ -0,0 +1,6 @@ +# name : Insert/update/remove a text block surrounded by marker lines +# key : blockinfile +# condition: ansible +# -- +- name: ${1:Insert/update/remove a text block surrounded by marker lines} + blockinfile: path=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/command b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/command new file mode 100644 index 00000000..7c02bcc1 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/command @@ -0,0 +1,6 @@ +# name : Execute commands on targets +# key : command +# condition: ansible +# -- +- name: ${1:Execute commands on targets} + command: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/copy b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/copy new file mode 100644 index 00000000..d472ab95 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/copy @@ -0,0 +1,6 @@ +# name : Copy files to remote locations +# key : copy +# condition: ansible +# -- +- name: ${1:Copy files to remote locations} + copy: dest=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/cron b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/cron new file mode 100644 index 00000000..6def1317 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/cron @@ -0,0 +1,6 @@ +# name : Manage cron.d and crontab entries +# key : cron +# condition: ansible +# -- +- name: ${1:Manage cron.d and crontab entries} + cron: name=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/deb822_repository b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/deb822_repository new file mode 100644 index 00000000..b1ffbe21 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/deb822_repository @@ -0,0 +1,6 @@ +# name : Add and remove deb822 formatted repositories +# key : deb822_repository +# condition: ansible +# -- +- name: ${1:Add and remove deb822 formatted repositories} + deb822_repository: name=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/debconf b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/debconf new file mode 100644 index 00000000..048d4038 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/debconf @@ -0,0 +1,6 @@ +# name : Configure a .deb package +# key : debconf +# condition: ansible +# -- +- name: ${1:Configure a .deb package} + debconf: name=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/debug b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/debug new file mode 100644 index 00000000..10ced142 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/debug @@ -0,0 +1,6 @@ +# name : Print statements during execution +# key : debug +# condition: ansible +# -- +- name: ${1:Print statements during execution} + debug: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/dnf b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/dnf new file mode 100644 index 00000000..71d13e8c --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/dnf @@ -0,0 +1,6 @@ +# name : Manages packages with the I(dnf) package manager +# key : dnf +# condition: ansible +# -- +- name: ${1:Manages packages with the I(dnf) package manager} + dnf: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/dnf5 b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/dnf5 new file mode 100644 index 00000000..9afb0c9a --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/dnf5 @@ -0,0 +1,6 @@ +# name : Manages packages with the I(dnf5) package manager +# key : dnf5 +# condition: ansible +# -- +- name: ${1:Manages packages with the I(dnf5) package manager} + dnf5: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/dpkg_selections b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/dpkg_selections new file mode 100644 index 00000000..3aab128a --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/dpkg_selections @@ -0,0 +1,6 @@ +# name : Dpkg package selection selections +# key : dpkg_selections +# condition: ansible +# -- +- name: ${1:Dpkg package selection selections} + dpkg_selections: name=$2 selection=$3 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/expect b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/expect new file mode 100644 index 00000000..10d1b3ba --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/expect @@ -0,0 +1,6 @@ +# name : Executes a command and responds to prompts +# key : expect +# condition: ansible +# -- +- name: ${1:Executes a command and responds to prompts} + expect: command=$2 responses=$3 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/fail b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/fail new file mode 100644 index 00000000..a5c96115 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/fail @@ -0,0 +1,6 @@ +# name : Fail with custom message +# key : fail +# condition: ansible +# -- +- name: ${1:Fail with custom message} + fail: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/fetch b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/fetch new file mode 100644 index 00000000..3f338667 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/fetch @@ -0,0 +1,6 @@ +# name : Fetch files from remote nodes +# key : fetch +# condition: ansible +# -- +- name: ${1:Fetch files from remote nodes} + fetch: src=$2 dest=$3 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/file b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/file new file mode 100644 index 00000000..7a498bef --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/file @@ -0,0 +1,6 @@ +# name : Manage files and file properties +# key : file +# condition: ansible +# -- +- name: ${1:Manage files and file properties} + file: path=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/find b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/find new file mode 100644 index 00000000..aa6ddd89 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/find @@ -0,0 +1,6 @@ +# name : Return a list of files based on specific criteria +# key : find +# condition: ansible +# -- +- name: ${1:Return a list of files based on specific criteria} + find: paths=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/gather_facts b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/gather_facts new file mode 100644 index 00000000..78f0c004 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/gather_facts @@ -0,0 +1,6 @@ +# name : Gathers facts about remote hosts +# key : gather_facts +# condition: ansible +# -- +- name: ${1:Gathers facts about remote hosts} + gather_facts: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/get_url b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/get_url new file mode 100644 index 00000000..884fc6b2 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/get_url @@ -0,0 +1,6 @@ +# name : Downloads files from HTTP, HTTPS, or FTP to node +# key : get_url +# condition: ansible +# -- +- name: ${1:Downloads files from HTTP, HTTPS, or FTP to node} + get_url: url=$2 dest=$3 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/getent b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/getent new file mode 100644 index 00000000..cdcf1ed3 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/getent @@ -0,0 +1,6 @@ +# name : A wrapper to the unix getent utility +# key : getent +# condition: ansible +# -- +- name: ${1:A wrapper to the unix getent utility} + getent: database=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/git b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/git new file mode 100644 index 00000000..18d61145 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/git @@ -0,0 +1,6 @@ +# name : Deploy software (or files) from git checkouts +# key : git +# condition: ansible +# -- +- name: ${1:Deploy software (or files) from git checkouts} + git: repo=$2 dest=$3 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/group b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/group new file mode 100644 index 00000000..0acffcf7 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/group @@ -0,0 +1,6 @@ +# name : Add or remove groups +# key : group +# condition: ansible +# -- +- name: ${1:Add or remove groups} + group: name=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/group_by b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/group_by new file mode 100644 index 00000000..0b987e9d --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/group_by @@ -0,0 +1,6 @@ +# name : Create Ansible groups based on facts +# key : group_by +# condition: ansible +# -- +- name: ${1:Create Ansible groups based on facts} + group_by: key=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/hostname b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/hostname new file mode 100644 index 00000000..47e75842 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/hostname @@ -0,0 +1,6 @@ +# name : Manage hostname +# key : hostname +# condition: ansible +# -- +- name: ${1:Manage hostname} + hostname: name=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/import_playbook b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/import_playbook new file mode 100644 index 00000000..f6816f91 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/import_playbook @@ -0,0 +1,6 @@ +# name : Import a playbook +# key : import_playbook +# condition: ansible +# -- +- name: ${1:Import a playbook} + import_playbook: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/import_role b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/import_role new file mode 100644 index 00000000..9bd30ff1 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/import_role @@ -0,0 +1,6 @@ +# name : Import a role into a play +# key : import_role +# condition: ansible +# -- +- name: ${1:Import a role into a play} + import_role: name=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/import_tasks b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/import_tasks new file mode 100644 index 00000000..7a22ee95 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/import_tasks @@ -0,0 +1,6 @@ +# name : Import a task list +# key : import_tasks +# condition: ansible +# -- +- name: ${1:Import a task list} + import_tasks: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/include_role b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/include_role new file mode 100644 index 00000000..1a41f008 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/include_role @@ -0,0 +1,6 @@ +# name : Load and execute a role +# key : include_role +# condition: ansible +# -- +- name: ${1:Load and execute a role} + include_role: name=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/include_tasks b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/include_tasks new file mode 100644 index 00000000..13afa524 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/include_tasks @@ -0,0 +1,6 @@ +# name : Dynamically include a task list +# key : include_tasks +# condition: ansible +# -- +- name: ${1:Dynamically include a task list} + include_tasks: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/include_vars b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/include_vars new file mode 100644 index 00000000..f88e141e --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/include_vars @@ -0,0 +1,6 @@ +# name : Load variables from files, dynamically within a task +# key : include_vars +# condition: ansible +# -- +- name: ${1:Load variables from files, dynamically within a task} + include_vars: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/iptables b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/iptables new file mode 100644 index 00000000..305c8465 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/iptables @@ -0,0 +1,6 @@ +# name : Modify iptables rules +# key : iptables +# condition: ansible +# -- +- name: ${1:Modify iptables rules} + iptables: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/known_hosts b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/known_hosts new file mode 100644 index 00000000..d9931d84 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/known_hosts @@ -0,0 +1,6 @@ +# name : Add or remove a host from the C(known_hosts) file +# key : known_hosts +# condition: ansible +# -- +- name: ${1:Add or remove a host from the C(known_hosts) file} + known_hosts: name=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/lineinfile b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/lineinfile new file mode 100644 index 00000000..7b371d35 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/lineinfile @@ -0,0 +1,6 @@ +# name : Manage lines in text files +# key : lineinfile +# condition: ansible +# -- +- name: ${1:Manage lines in text files} + lineinfile: path=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/meta b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/meta new file mode 100644 index 00000000..dc17cc2a --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/meta @@ -0,0 +1,6 @@ +# name : Execute Ansible 'actions' +# key : meta +# condition: ansible +# -- +- name: ${1:Execute Ansible 'actions'} + meta: free_form=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/mount_facts b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/mount_facts new file mode 100644 index 00000000..8a2aa070 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/mount_facts @@ -0,0 +1,6 @@ +# name : Retrieve mount information. +# key : mount_facts +# condition: ansible +# -- +- name: ${1:Retrieve mount information.} + mount_facts: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/package b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/package new file mode 100644 index 00000000..c0a4ada4 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/package @@ -0,0 +1,6 @@ +# name : Generic OS package manager +# key : package +# condition: ansible +# -- +- name: ${1:Generic OS package manager} + package: name=$2 state=$3 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/package_facts b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/package_facts new file mode 100644 index 00000000..c7cdfe80 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/package_facts @@ -0,0 +1,6 @@ +# name : Package information as facts +# key : package_facts +# condition: ansible +# -- +- name: ${1:Package information as facts} + package_facts: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/pause b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/pause new file mode 100644 index 00000000..dccecd85 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/pause @@ -0,0 +1,6 @@ +# name : Pause playbook execution +# key : pause +# condition: ansible +# -- +- name: ${1:Pause playbook execution} + pause: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/ping b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/ping new file mode 100644 index 00000000..ca441e43 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/ping @@ -0,0 +1,6 @@ +# name : Try to connect to host, verify a usable python and return V(pong) on success +# key : ping +# condition: ansible +# -- +- name: ${1:Try to connect to host, verify a usable python and return V(pong) on success} + ping: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/pip b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/pip new file mode 100644 index 00000000..3936af47 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/pip @@ -0,0 +1,6 @@ +# name : Manages Python library dependencies +# key : pip +# condition: ansible +# -- +- name: ${1:Manages Python library dependencies} + pip: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/raw b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/raw new file mode 100644 index 00000000..a6de9022 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/raw @@ -0,0 +1,6 @@ +# name : Executes a low-down and dirty command +# key : raw +# condition: ansible +# -- +- name: ${1:Executes a low-down and dirty command} + raw: free_form=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/reboot b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/reboot new file mode 100644 index 00000000..1c85ed99 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/reboot @@ -0,0 +1,6 @@ +# name : Reboot a machine +# key : reboot +# condition: ansible +# -- +- name: ${1:Reboot a machine} + reboot: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/replace b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/replace new file mode 100644 index 00000000..4e77c3f1 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/replace @@ -0,0 +1,6 @@ +# name : Replace all instances of a particular string in a file using a back-referenced regular expression +# key : replace +# condition: ansible +# -- +- name: ${1:Replace all instances of a particular string in a file using a back-referenced regular expression} + replace: path=$2 regexp=$3 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/rpm_key b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/rpm_key new file mode 100644 index 00000000..163bb590 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/rpm_key @@ -0,0 +1,6 @@ +# name : Adds or removes a gpg key from the rpm db +# key : rpm_key +# condition: ansible +# -- +- name: ${1:Adds or removes a gpg key from the rpm db} + rpm_key: key=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/script b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/script new file mode 100644 index 00000000..9636db31 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/script @@ -0,0 +1,6 @@ +# name : Runs a local script on a remote node after transferring it +# key : script +# condition: ansible +# -- +- name: ${1:Runs a local script on a remote node after transferring it} + script: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/service b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/service new file mode 100644 index 00000000..5bd9f5c0 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/service @@ -0,0 +1,6 @@ +# name : Manage services +# key : service +# condition: ansible +# -- +- name: ${1:Manage services} + service: name=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/service_facts b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/service_facts new file mode 100644 index 00000000..c373d7b6 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/service_facts @@ -0,0 +1,6 @@ +# name : Return service state information as fact data +# key : service_facts +# condition: ansible +# -- +- name: ${1:Return service state information as fact data} + service_facts: $2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/set_fact b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/set_fact new file mode 100644 index 00000000..b532a529 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/set_fact @@ -0,0 +1,6 @@ +# name : Set host variable(s) and fact(s). +# key : set_fact +# condition: ansible +# -- +- name: ${1:Set host variable(s) and fact(s).} + set_fact: key_value=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/set_stats b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/set_stats new file mode 100644 index 00000000..71e862a8 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/set_stats @@ -0,0 +1,6 @@ +# name : Define and display stats for the current ansible run +# key : set_stats +# condition: ansible +# -- +- name: ${1:Define and display stats for the current ansible run} + set_stats: data=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/setup b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/setup new file mode 100644 index 00000000..0cf6586b --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/setup @@ -0,0 +1,6 @@ +# name : Gathers facts about remote hosts +# key : setup +# condition: ansible +# -- +- name: ${1:Gathers facts about remote hosts} + setup: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/shell b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/shell new file mode 100644 index 00000000..95e08c9e --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/shell @@ -0,0 +1,6 @@ +# name : Execute shell commands on targets +# key : shell +# condition: ansible +# -- +- name: ${1:Execute shell commands on targets} + shell: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/slurp b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/slurp new file mode 100644 index 00000000..e15316bb --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/slurp @@ -0,0 +1,6 @@ +# name : Slurps a file from remote nodes +# key : slurp +# condition: ansible +# -- +- name: ${1:Slurps a file from remote nodes} + slurp: src=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/stat b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/stat new file mode 100644 index 00000000..f53f1306 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/stat @@ -0,0 +1,6 @@ +# name : Retrieve file or file system status +# key : stat +# condition: ansible +# -- +- name: ${1:Retrieve file or file system status} + stat: path=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/subversion b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/subversion new file mode 100644 index 00000000..871f7b60 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/subversion @@ -0,0 +1,6 @@ +# name : Deploys a subversion repository +# key : subversion +# condition: ansible +# -- +- name: ${1:Deploys a subversion repository} + subversion: repo=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/systemd b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/systemd new file mode 100644 index 00000000..add74a8d --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/systemd @@ -0,0 +1,6 @@ +# name : Manage systemd units +# key : systemd_service +# condition: ansible +# -- +- name: ${1:Manage systemd units} + systemd_service: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/systemd_service b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/systemd_service new file mode 100644 index 00000000..add74a8d --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/systemd_service @@ -0,0 +1,6 @@ +# name : Manage systemd units +# key : systemd_service +# condition: ansible +# -- +- name: ${1:Manage systemd units} + systemd_service: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/sysvinit b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/sysvinit new file mode 100644 index 00000000..b18e7285 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/sysvinit @@ -0,0 +1,6 @@ +# name : Manage SysV services. +# key : sysvinit +# condition: ansible +# -- +- name: ${1:Manage SysV services.} + sysvinit: name=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/tempfile b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/tempfile new file mode 100644 index 00000000..ff2b3181 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/tempfile @@ -0,0 +1,6 @@ +# name : Creates temporary files and directories +# key : tempfile +# condition: ansible +# -- +- name: ${1:Creates temporary files and directories} + tempfile: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/template b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/template new file mode 100644 index 00000000..5265b572 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/template @@ -0,0 +1,6 @@ +# name : Template a file out to a target host +# key : template +# condition: ansible +# -- +- name: ${1:Template a file out to a target host} + template: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/unarchive b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/unarchive new file mode 100644 index 00000000..33b23ed5 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/unarchive @@ -0,0 +1,6 @@ +# name : Unpacks an archive after (optionally) copying it from the local machine +# key : unarchive +# condition: ansible +# -- +- name: ${1:Unpacks an archive after (optionally) copying it from the local machine} + unarchive: src=$2 dest=$3 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/uri b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/uri new file mode 100644 index 00000000..a86af10e --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/uri @@ -0,0 +1,6 @@ +# name : Interacts with webservices +# key : uri +# condition: ansible +# -- +- name: ${1:Interacts with webservices} + uri: url=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/user b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/user new file mode 100644 index 00000000..daa4bc64 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/user @@ -0,0 +1,6 @@ +# name : Manage user accounts +# key : user +# condition: ansible +# -- +- name: ${1:Manage user accounts} + user: name=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/validate_argument_spec b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/validate_argument_spec new file mode 100644 index 00000000..e114e454 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/validate_argument_spec @@ -0,0 +1,6 @@ +# name : Validate role argument specs. +# key : validate_argument_spec +# condition: ansible +# -- +- name: ${1:Validate role argument specs.} + validate_argument_spec: argument_spec=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/wait_for b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/wait_for new file mode 100644 index 00000000..e1758347 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/wait_for @@ -0,0 +1,6 @@ +# name : Waits for a condition before continuing +# key : wait_for +# condition: ansible +# -- +- name: ${1:Waits for a condition before continuing} + wait_for: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/wait_for_connection b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/wait_for_connection new file mode 100644 index 00000000..d7e59ff8 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/wait_for_connection @@ -0,0 +1,6 @@ +# name : Waits until remote system is reachable/usable +# key : wait_for_connection +# condition: ansible +# -- +- name: ${1:Waits until remote system is reachable/usable} + wait_for_connection: $0 diff --git a/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/yum_repository b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/yum_repository new file mode 100644 index 00000000..24dcd5bb --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/text-mode/ansible/modules/yum_repository @@ -0,0 +1,6 @@ +# name : Add or remove YUM repositories +# key : yum_repository +# condition: ansible +# -- +- name: ${1:Add or remove YUM repositories} + yum_repository: name=$2 $0 diff --git a/elpa/ansible-20250613.2354/snippets/yaml-mode/.yas-parents b/elpa/ansible-20250613.2354/snippets/yaml-mode/.yas-parents new file mode 100644 index 00000000..d58dacb7 --- /dev/null +++ b/elpa/ansible-20250613.2354/snippets/yaml-mode/.yas-parents @@ -0,0 +1 @@ +text-mode \ No newline at end of file