差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
linux:ansible [2024/02/07 18:16] – [pipx によるインストール] ともやん | linux:ansible [2024/03/08 11:04] (現在) – [pipx によるインストール] ともやん | ||
---|---|---|---|
行 150: | 行 150: | ||
<WRAP color_term> | <WRAP color_term> | ||
<WRAP color_command>< | <WRAP color_command>< | ||
- | <font color="# | + | <font color="# |
<font color="# | <font color="# | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ==== dnf によるインストール ==== | ||
+ | 公式: [[https:// | ||
+ | <WRAP color_term> | ||
+ | <WRAP color_command>< | ||
+ | <font color="# | ||
+ | </ | ||
+ | <WRAP color_result_long>< | ||
+ | メタデータの期限切れの最終確認: | ||
+ | 依存関係が解決しました。 | ||
+ | ============================================================================================================== | ||
+ | | ||
+ | ============================================================================================================== | ||
+ | インストール: | ||
+ | < | ||
+ | 依存関係のインストール: | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | 弱い依存関係のインストール: | ||
+ | < | ||
+ | |||
+ | トランザクションの概要 | ||
+ | ============================================================================================================== | ||
+ | インストール | ||
+ | |||
+ | ダウンロードサイズの合計: | ||
+ | インストール後のサイズ: | ||
+ | パッケージのダウンロード: | ||
+ | (1/6): python3-resolvelib-0.5.5-9.fc39.noarch.rpm | ||
+ | (2/6): libdnf5-5.1.11-1.fc39.x86_64.rpm | ||
+ | (3/6): python3-jinja2-3.1.3-1.fc39.noarch.rpm | ||
+ | (4/6): ansible-core-2.16.2-2.fc39.noarch.rpm | ||
+ | (5/6): python3-libdnf5-5.1.11-1.fc39.x86_64.rpm | ||
+ | (6/6): ansible-9.1.0-1.fc39.noarch.rpm | ||
+ | -------------------------------------------------------------------------------------------------------------- | ||
+ | 合計 | ||
+ | トランザクションの確認を実行中 | ||
+ | トランザクションの確認に成功しました。 | ||
+ | トランザクションのテストを実行中 | ||
+ | トランザクションのテストに成功しました。 | ||
+ | トランザクションを実行中 | ||
+ | 準備 | ||
+ | インストール中 | ||
+ | インストール中 | ||
+ | インストール中 | ||
+ | インストール中 | ||
+ | インストール中 | ||
+ | インストール中 | ||
+ | scriptletの実行中: | ||
+ | 検証 | ||
+ | 検証 | ||
+ | 検証 | ||
+ | 検証 | ||
+ | 検証 | ||
+ | 検証 | ||
+ | |||
+ | インストール済み: | ||
+ | ansible-9.1.0-1.fc39.noarch | ||
+ | libdnf5-5.1.11-1.fc39.x86_64 | ||
+ | python3-libdnf5-5.1.11-1.fc39.x86_64 | ||
+ | |||
+ | 完了しました! | ||
</ | </ | ||
</ | </ | ||
行 161: | 行 227: | ||
</ | </ | ||
</ | </ | ||
+ | |||
+ | ===== ansible.cfg 設定ファイルの生成 ===== | ||
+ | 公式: [[https:// | ||
+ | <WRAP color_term> | ||
+ | <WRAP color_command>< | ||
+ | <font color="# | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <WRAP color_term> | ||
+ | <WRAP color_command>< | ||
+ | <font color="# | ||
+ | </ | ||
+ | <WRAP color_mincode_long>< | ||
+ | [defaults] | ||
+ | # (boolean) By default Ansible will issue a warning when received from a task action (module or action plugin) | ||
+ | # These warnings can be silenced by adjusting this setting to False. | ||
+ | ; | ||
+ | |||
+ | # (list) Accept list of cowsay templates that are & | ||
+ | ; | ||
+ | |||
+ | # (string) Specify a custom cowsay path or swap in your cowsay implementation of choice | ||
+ | ;cowpath= | ||
+ | |||
+ | # (string) This allows you to chose a specific cowsay stencil for the banners or use & | ||
+ | ; | ||
+ | |||
+ | # (boolean) This option forces color mode even when running without a TTY or the & | ||
+ | ; | ||
+ | |||
+ | # (path) The default root path for Ansible config files on the controller. | ||
+ | ; | ||
+ | |||
+ | # (boolean) This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information. | ||
+ | ; | ||
+ | |||
+ | # (boolean) If you have cowsay installed but want to avoid the & | ||
+ | ; | ||
+ | |||
+ | # (boolean) Sets the default value for the any_errors_fatal keyword, if True, Task failures will be considered fatal errors. | ||
+ | ; | ||
+ | |||
+ | # (path) The password file to use for the become plugin. --become-password-file. | ||
+ | # If executable, it will be run and the resulting stdout will be used as the password. | ||
+ | ; | ||
+ | |||
+ | # (pathspec) Colon separated paths in which Ansible will search for Become Plugins. | ||
+ | ; | ||
+ | |||
+ | # (string) Chooses which cache plugin to use, the default & | ||
+ | ; | ||
+ | |||
+ | # (string) Defines connection or path information for the cache plugin | ||
+ | ; | ||
+ | |||
+ | # (string) Prefix to use for cache plugin files/ | ||
+ | ; | ||
+ | |||
+ | # (integer) Expiration timeout for the cache plugin data | ||
+ | ; | ||
+ | |||
+ | # (list) List of enabled callbacks, not all callbacks need enabling, but many of those shipped with Ansible do as we don& | ||
+ | ; | ||
+ | |||
+ | # (string) When a collection is loaded that does not support the running Ansible version (with the collection metadata key `requires_ansible`). | ||
+ | ; | ||
+ | |||
+ | # (pathspec) Colon separated paths in which Ansible will search for collections content. Collections must be in nested *subdirectories*, | ||
+ | |||
+ | ; | ||
+ | |||
+ | # (boolean) A boolean to enable or disable scanning the sys.path for installed collections | ||
+ | ; | ||
+ | |||
+ | # (path) The password file to use for the connection plugin. --connection-password-file. | ||
+ | ; | ||
+ | |||
+ | # (pathspec) Colon separated paths in which Ansible will search for Action Plugins. | ||
+ | ; | ||
+ | |||
+ | # (boolean) When enabled, this option allows lookup plugins (whether used in variables as ``{{lookup(& | ||
+ | # By default, such data is marked as unsafe to prevent the templating engine from evaluating any jinja2 templating language, as this could represent a security risk. This option is provided to allow for backward compatibility, | ||
+ | ; | ||
+ | |||
+ | # (boolean) This controls whether an Ansible playbook should prompt for a login password. If using SSH keys for authentication, | ||
+ | ; | ||
+ | |||
+ | # (boolean) This controls whether an Ansible playbook should prompt for a vault password. | ||
+ | ; | ||
+ | |||
+ | # (pathspec) Colon separated paths in which Ansible will search for Cache Plugins. | ||
+ | ; | ||
+ | |||
+ | # (pathspec) Colon separated paths in which Ansible will search for Callback Plugins. | ||
+ | ; | ||
+ | |||
+ | # (pathspec) Colon separated paths in which Ansible will search for Cliconf Plugins. | ||
+ | ; | ||
+ | |||
+ | # (pathspec) Colon separated paths in which Ansible will search for Connection Plugins. | ||
+ | ; | ||
+ | |||
+ | # (boolean) Toggles debug output in Ansible. This is *very* verbose and can hinder multiprocessing. | ||
+ | ; | ||
+ | |||
+ | # (string) This indicates the command to use to spawn a shell under for Ansible& | ||
+ | ; | ||
+ | |||
+ | # (string) This option allows you to globally configure a custom path for & | ||
+ | # If not set, it will fallback to the default from the ``ansible.builtin.setup`` module: ``/ | ||
+ | # This does **not** affect | ||
+ | # The real action being created by the implicit task is currently | ||
+ | ;fact_path= | ||
+ | |||
+ | # (pathspec) Colon separated paths in which Ansible will search for Jinja2 Filter Plugins. | ||
+ | ; | ||
+ | |||
+ | # (boolean) This option controls if notified handlers run on a host even if a failure occurs on that host. | ||
+ | # When false, the handlers will not run if a failure has occurred on a host. | ||
+ | # This can also be set per play or on the command line. See Handlers and Failure for more details. | ||
+ | ; | ||
+ | |||
+ | # (integer) Maximum number of forks Ansible will use to execute tasks on target hosts. | ||
+ | ;forks=5 | ||
+ | |||
+ | # (string) This setting controls the default policy of fact gathering (facts discovered about remote systems). | ||
+ | # This option can be useful for those wishing to save fact gathering time. Both & | ||
+ | ; | ||
+ | |||
+ | # (list) Set the `gather_subset` option for the : | ||
+ | # It does **not** apply to user defined ``ansible.builtin.setup`` tasks. | ||
+ | ; | ||
+ | |||
+ | # (integer) Set the timeout in seconds for the implicit fact gathering, see the module documentation for specifics. | ||
+ | # It does **not** apply to user defined : | ||
+ | ; | ||
+ | |||
+ | # (string) This setting controls how duplicate definitions of dictionary variables (aka hash, map, associative array) are handled in Ansible. | ||
+ | # This does not affect variables whose values are scalars (integers, strings) or arrays. | ||
+ | # **WARNING**, | ||
+ | # We recommend avoiding reusing variable names and relying on the ``combine`` filter and ``vars`` and ``varnames`` lookups to create merged versions of the individual variables. In our experience this is rarely really needed and a sign that too much complexity has been introduced into the data structures and plays. | ||
+ | # For some uses you can also look into custom vars_plugins to merge on input, even substituting the default ``host_group_vars`` that is in charge of parsing the ``host_vars/ | ||
+ | # All playbooks and roles in the official examples repos assume the default for this setting. | ||
+ | # Changing the setting to ``merge`` applies across variable sources, but many sources will internally still overwrite the variables. For example ``include_vars`` will dedupe variables internally before updating Ansible, with & | ||
+ | # The Ansible project recommends you **avoid ``merge`` for new projects.** | ||
+ | # It is the intention of the Ansible developers to eventually deprecate and remove this setting, but it is being kept as some users do heavily rely on it. New projects should **avoid & | ||
+ | ; | ||
+ | |||
+ | # (pathlist) Comma separated list of Ansible inventory sources | ||
+ | ; | ||
+ | |||
+ | # (pathspec) Colon separated paths in which Ansible will search for HttpApi Plugins. | ||
+ | ; | ||
+ | |||
+ | # (float) This sets the interval (in seconds) of Ansible internal processes polling each other. Lower values improve performance with large playbooks at the expense of extra CPU load. Higher values are more suitable for Ansible usage in automation scenarios, when UI responsiveness is not required but CPU usage might be a concern. | ||
+ | # The default corresponds to the value hardcoded in Ansible <= 2.1 | ||
+ | ; | ||
+ | |||
+ | # (pathspec) Colon separated paths in which Ansible will search for Inventory Plugins. | ||
+ | ; | ||
+ | |||
+ | # (string) This is a developer-specific feature that allows enabling additional Jinja2 extensions. | ||
+ | # See the Jinja2 documentation for details. If you do not know what these do, you probably don& | ||
+ | ; | ||
+ | |||
+ | # (boolean) This option preserves variable types during template operations. | ||
+ | ; | ||
+ | |||
+ | # (boolean) Enables/ | ||
+ | # If this option is enabled it will disable ``ANSIBLE_PIPELINING``. | ||
+ | ; | ||
+ | |||
+ | # (boolean) Controls whether callback plugins are loaded when running / | ||
+ | ; | ||
+ | |||
+ | # (tmppath) Temporary directory for Ansible to use on the controller. | ||
+ | ; | ||
+ | |||
+ | # (list) List of logger names to filter out of the log file | ||
+ | ; | ||
+ | |||
+ | # (path) File to which Ansible will log on the controller. When empty logging is disabled. | ||
+ | ;log_path= | ||
+ | |||
+ | # (pathspec) Colon separated paths in which Ansible will search for Lookup Plugins. | ||
+ | ; | ||
+ | |||
+ | # (string) Sets the macro for the & | ||
+ | ; | ||
+ | |||
+ | # (string) This sets the default arguments to pass to the ``ansible`` adhoc binary if no ``-a`` is specified. | ||
+ | ; | ||
+ | |||
+ | # (string) Compression scheme to use when transferring Python modules to the target. | ||
+ | ; | ||
+ | |||
+ | # (string) Module to use with the ``ansible`` AdHoc command, if none is specified via ``-m``. | ||
+ | ; | ||
+ | |||
+ | # (pathspec) Colon separated paths in which Ansible will search for Modules. | ||
+ | ;library={{ ANSIBLE_HOME ~ & | ||
+ | |||
+ | # (pathspec) Colon separated paths in which Ansible will search for Module utils files, which are shared by modules. | ||
+ | ; | ||
+ | |||
+ | # (pathspec) Colon separated paths in which Ansible will search for Netconf Plugins. | ||
+ | ; | ||
+ | |||
+ | # (boolean) Toggle Ansible& | ||
+ | ; | ||
+ | |||
+ | # (boolean) Toggle Ansible logging to syslog on the target when it executes tasks. On Windows hosts this will disable a newer style PowerShell modules from writing to the event log. | ||
+ | ; | ||
+ | |||
+ | # (raw) What templating should return as a & | ||
+ | ; | ||
+ | |||
+ | # (integer) For asynchronous tasks in Ansible (covered in Asynchronous Actions and Polling), this is how often to check back on the status of those tasks when an explicit poll interval is not supplied. The default is a reasonably moderate 15 seconds which is a tradeoff between checking in frequently and providing a quick turnaround when something may have completed. | ||
+ | ; | ||
+ | |||
+ | # (path) Option for connections using a certificate or key file to authenticate, | ||
+ | ; | ||
+ | |||
+ | # (boolean) By default, imported roles publish their variables to the play and other roles, this setting can avoid that. | ||
+ | # This was introduced as a way to reset role variables to default values if a role is used more than once in a playbook. | ||
+ | # Included roles only make their variables public at execution, unlike imported roles which happen at playbook compile time. | ||
+ | ; | ||
+ | |||
+ | # (integer) Port to use in remote connections, | ||
+ | ; | ||
+ | |||
+ | # (string) Sets the login user for the target machines | ||
+ | # When blank it uses the connection plugin& | ||
+ | ; | ||
+ | |||
+ | # (pathspec) Colon separated paths in which Ansible will search for Roles. | ||
+ | ; | ||
+ | |||
+ | # (string) Set the main callback used to display Ansible output. You can only have one at a time. | ||
+ | # You can have many other callbacks, but just one can be in charge of stdout. | ||
+ | # See : | ||
+ | ; | ||
+ | |||
+ | # (string) Set the default strategy used for plays. | ||
+ | ; | ||
+ | |||
+ | # (pathspec) Colon separated paths in which Ansible will search for Strategy Plugins. | ||
+ | ; | ||
+ | |||
+ | # (boolean) Toggle the use of & | ||
+ | ;su=False | ||
+ | |||
+ | # (string) Syslog facility to use when Ansible logs to the remote target | ||
+ | ; | ||
+ | |||
+ | # (pathspec) Colon separated paths in which Ansible will search for Terminal Plugins. | ||
+ | ; | ||
+ | |||
+ | # (pathspec) Colon separated paths in which Ansible will search for Jinja2 Test Plugins. | ||
+ | ; | ||
+ | |||
+ | # (integer) This is the default timeout for connection plugins to use. | ||
+ | ;timeout=10 | ||
+ | |||
+ | # (string) Can be any connection plugin available to your ansible installation. | ||
+ | # There is also a (DEPRECATED) special & | ||
+ | ; | ||
+ | |||
+ | # (boolean) When True, this causes ansible templating to fail steps that reference variable names that are likely typoed. | ||
+ | # Otherwise, any & | ||
+ | ; | ||
+ | |||
+ | # (pathspec) Colon separated paths in which Ansible will search for Vars Plugins. | ||
+ | ; | ||
+ | |||
+ | # (string) The vault_id to use for encrypting by default. If multiple vault_ids are provided, this specifies which to use for encryption. The --encrypt-vault-id cli option overrides the configured value. | ||
+ | ; | ||
+ | |||
+ | # (string) The label to use for the default vault id label in cases where a vault id label is not provided | ||
+ | ; | ||
+ | |||
+ | # (list) A list of vault-ids to use by default. Equivalent to multiple --vault-id args. Vault-ids are tried in order. | ||
+ | ; | ||
+ | |||
+ | # (string) If true, decrypting vaults with a vault id will only try the password from the matching vault-id | ||
+ | ; | ||
+ | |||
+ | # (path) The vault password file to use. Equivalent to --vault-password-file or --vault-id | ||
+ | # If executable, it will be run and the resulting stdout will be used as the password. | ||
+ | ; | ||
+ | |||
+ | # (integer) Sets the default verbosity, equivalent to the number of ``-v`` passed in the command line. | ||
+ | ; | ||
+ | |||
+ | # (boolean) Toggle to control the showing of deprecation warnings | ||
+ | ; | ||
+ | |||
+ | # (boolean) Toggle to control showing warnings related to running devel | ||
+ | ; | ||
+ | |||
+ | # (boolean) Normally ``ansible-playbook`` will print a header for each task that is run. These headers will contain the name: field from the task if you specified one. If you didn& | ||
+ | # This setting defaults to False because there is a chance that you have sensitive values in your parameters and you do not want those to be printed. | ||
+ | # If you set this to True you should be sure that you have secured your environment& | ||
+ | ; | ||
+ | |||
+ | # (boolean) Toggle to control displaying skipped task/host entries in a task in the default callback | ||
+ | ; | ||
+ | |||
+ | # (string) Root docsite URL used to generate docs URLs in warning/ | ||
+ | ; | ||
+ | |||
+ | # (pathspec) Colon separated paths in which Ansible will search for Documentation Fragments Plugins. | ||
+ | ; | ||
+ | |||
+ | # (string) By default Ansible will issue a warning when a duplicate dict key is encountered in YAML. | ||
+ | # These warnings can be silenced by adjusting this setting to False. | ||
+ | ; | ||
+ | |||
+ | # (boolean) Whether or not to enable the task debugger, this previously was done as a strategy plugin. | ||
+ | # Now all strategy plugins can inherit this behavior. The debugger defaults to activating when | ||
+ | # a task is failed on unreachable. Use the debugger keyword for more flexibility. | ||
+ | ; | ||
+ | |||
+ | # (boolean) Toggle to allow missing handlers to become a warning instead of an error when notifying. | ||
+ | ; | ||
+ | |||
+ | # (list) Which modules to run during a play& | ||
+ | # If adding your own modules but you still want to use the default Ansible facts, you will want to include & | ||
+ | # This does not affect explicit calls to the & | ||
+ | ; | ||
+ | |||
+ | # (boolean) Set this to & | ||
+ | ; | ||
+ | |||
+ | # (boolean) Facts are available inside the `ansible_facts` variable, this setting also pushes them as their own vars in the main namespace. | ||
+ | # Unlike inside the `ansible_facts` dictionary, these will have an `ansible_` prefix. | ||
+ | ; | ||
+ | |||
+ | # (string) Path to the Python interpreter to be used for module execution on remote targets, or an automatic discovery mode. Supported discovery modes are ``auto`` (the default), ``auto_silent``, | ||
+ | ; | ||
+ | |||
+ | # (boolean) If & | ||
+ | ; | ||
+ | |||
+ | # (boolean) Toggle to control showing warnings related to running a Jinja version older than required for jinja2_native | ||
+ | ; | ||
+ | |||
+ | # (boolean) By default Ansible will issue a warning when there are no hosts in the inventory. | ||
+ | # These warnings can be silenced by adjusting this setting to False. | ||
+ | ; | ||
+ | |||
+ | # (int) Maximum size of files to be considered for diff display | ||
+ | ; | ||
+ | |||
+ | # (list) List of extensions to ignore when looking for modules to load | ||
+ | # This is for rejecting script and binary module fallback extensions | ||
+ | ; | ||
+ | |||
+ | # (bool) Enables whether module responses are evaluated for containing non UTF-8 data | ||
+ | # Disabling this may result in unexpected behavior | ||
+ | # Only ansible-core should evaluate this configuration | ||
+ | ; | ||
+ | |||
+ | # (list) TODO: write it | ||
+ | ; | ||
+ | |||
+ | # (boolean) Previously Ansible would only clear some of the plugin loading caches when loading new roles, this led to some behaviours in which a plugin loaded in previous plays would be unexpectedly & | ||
+ | ; | ||
+ | |||
+ | # (path) A number of non-playbook CLIs have a ``--playbook-dir`` argument; this sets the default value for it. | ||
+ | ; | ||
+ | |||
+ | # (string) This sets which playbook dirs will be used as a root to process vars plugins, which includes finding host_vars/ | ||
+ | ; | ||
+ | |||
+ | # (path) A path to configuration for filtering which plugins installed on the system are allowed to be used. | ||
+ | # See : | ||
+ | # The default is / | ||
+ | ; | ||
+ | |||
+ | # (string) Attempts to set RLIMIT_NOFILE soft limit to the specified value when executing Python modules (can speed up subprocess usage on Python 2.x. See https:// | ||
+ | ; | ||
+ | |||
+ | # (bool) This controls whether a failed Ansible playbook should create a .retry file. | ||
+ | ; | ||
+ | |||
+ | # (path) This sets the path in which Ansible will save .retry files when a playbook fails and retry files are enabled. | ||
+ | # This file will be overwritten after each run with the list of failed hosts from all plays. | ||
+ | ; | ||
+ | |||
+ | # (str) This setting can be used to optimize vars_plugin usage depending on user& | ||
+ | ; | ||
+ | |||
+ | # (bool) This adds the custom stats set via the set_stats plugin to the default output | ||
+ | ; | ||
+ | |||
+ | # (string) Action to take when a module parameter value is converted to a string (this does not affect variables). For string parameters, values such as & | ||
+ | # Valid options are & | ||
+ | # Since 2.8, this option defaults to & | ||
+ | ; | ||
+ | |||
+ | # (boolean) Allows disabling of warnings related to potential issues on the system running ansible itself (not on the managed hosts) | ||
+ | # These may include warnings about 3rd party packages or other conditions that should be resolved if possible. | ||
+ | ; | ||
+ | |||
+ | # (boolean) This option defines whether the task debugger will be invoked on a failed task when ignore_errors=True is specified. | ||
+ | # True specifies that the debugger will honor ignore_errors, | ||
+ | ; | ||
+ | |||
+ | # (integer) Set the maximum time (in seconds) that a task can run for. | ||
+ | # If set to 0 (the default) there is no timeout. | ||
+ | ; | ||
+ | |||
+ | # (string) Make ansible transform invalid characters in group names supplied by inventory sources. | ||
+ | ; | ||
+ | |||
+ | # (boolean) Toggles the use of persistence for connections. | ||
+ | ; | ||
+ | |||
+ | # (bool) A toggle to disable validating a collection& | ||
+ | ; | ||
+ | |||
+ | # (list) Accept list for variable plugins that require it. | ||
+ | ; | ||
+ | |||
+ | # (list) Allows to change the group variable precedence merge order. | ||
+ | ; | ||
+ | |||
+ | # (string) The salt to use for the vault encryption. If it is not provided, a random salt will be used. | ||
+ | ; | ||
+ | |||
+ | # (bool) Force & | ||
+ | ; | ||
+ | |||
+ | # (integer) For asynchronous tasks in Ansible (covered in Asynchronous Actions and Polling), this is how long, in seconds, to wait for the task spawned by Ansible to connect back to the named pipe used on Windows systems. The default is 5 seconds. This can be too low on slower systems, or systems under heavy load. | ||
+ | # This is not the total time an async command can run for, but is a separate timeout to wait for an async command to start. The task will only start to be timed against its async_timeout once it has connected to the pipe, so the overall maximum duration the task can take will be extended by the amount specified here. | ||
+ | ; | ||
+ | |||
+ | # (list) Check all of these extensions when looking for & | ||
+ | # This affects vars_files, include_vars, | ||
+ | ; | ||
+ | |||
+ | # (bool) Toggle to control displaying markers when running in check mode. | ||
+ | # The markers are C(DRY RUN) at the beginning and ending of playbook execution (when calling C(ansible-playbook --check)) and C(CHECK MODE) as a suffix at every play and task that is run in check mode. | ||
+ | ; | ||
+ | |||
+ | # (bool) Toggle to control whether failed and unreachable tasks are displayed to STDERR (vs. STDOUT) | ||
+ | ; | ||
+ | |||
+ | # (bool) Toggle to control displaying & | ||
+ | ; | ||
+ | |||
+ | # (bool) Configure the result format to be more readable | ||
+ | # When O(result_format) is set to V(yaml) this option defaults to V(True), and defaults to V(False) when configured to V(json). | ||
+ | # Setting this option to V(True) will force V(json) and V(yaml) results to always be pretty printed regardless of verbosity. | ||
+ | # When set to V(True) and used with the V(yaml) result format, this option will modify module responses in an attempt to produce a more human friendly output at the expense of correctness, | ||
+ | ; | ||
+ | |||
+ | # (str) Define the task result format used in the callback output. | ||
+ | # These formats do not cause the callback to emit valid JSON or YAML formats. | ||
+ | # The output contains these formats interspersed with other non-machine parsable data. | ||
+ | ; | ||
+ | |||
+ | # (bool) This adds output that shows when a task is started to execute for each host | ||
+ | ; | ||
+ | |||
+ | # (bool) When a task fails, display the path to the file containing the failed task and the line number. This information is displayed automatically for every task when running with C(-vv) or greater verbosity. | ||
+ | ; | ||
+ | |||
+ | # (list) list of users to be expected to have admin privileges. This is used by the controller to determine how to share temporary files between the remote user and the become user. | ||
+ | ; | ||
+ | |||
+ | # (string) Directory in which ansible will keep async job information | ||
+ | ; | ||
+ | |||
+ | # (string) Checked when Ansible needs to execute a module as a different user. | ||
+ | # If setfacl and chown both fail and do not let the different user access the module& | ||
+ | # In order for this to work, the remote_user and become_user must share a common group and this setting must be set to that group. | ||
+ | ; | ||
+ | |||
+ | # (string) Temporary directory to use on targets when executing tasks. | ||
+ | ; | ||
+ | |||
+ | # (list) List of valid system temporary directories on the managed machine for Ansible to validate O(remote_tmp) against, when specific permissions are needed. | ||
+ | # When O(remote_tmp) is required to be a system temp dir and it does not match any in the list, the first one from the list will be used instead. | ||
+ | ; | ||
+ | |||
+ | # (boolean) This makes the temporary files created on the machine world-readable and will issue a warning instead of failing the task. | ||
+ | # It is useful when becoming an unprivileged user. | ||
+ | ; | ||
+ | |||
+ | |||
+ | [privilege_escalation] | ||
+ | # (boolean) Display an agnostic become prompt instead of displaying a prompt containing the command line supplied become method | ||
+ | ; | ||
+ | |||
+ | # (boolean) This setting controls if become is skipped when remote user and become user are the same. I.E root sudo to root. | ||
+ | # If executable, it will be run and the resulting stdout will be used as the password. | ||
+ | ; | ||
+ | |||
+ | # (boolean) Toggles the use of privilege escalation, allowing you to & | ||
+ | ; | ||
+ | |||
+ | # (boolean) Toggle to prompt for privilege escalation password. | ||
+ | ; | ||
+ | |||
+ | # (string) executable to use for privilege escalation, otherwise Ansible will depend on PATH | ||
+ | ; | ||
+ | |||
+ | # (string) Flags to pass to the privilege escalation executable. | ||
+ | ; | ||
+ | |||
+ | # (string) Privilege escalation method to use when `become` is enabled. | ||
+ | ; | ||
+ | |||
+ | # (string) The user your login/ | ||
+ | ; | ||
+ | |||
+ | |||
+ | [persistent_connection] | ||
+ | # (path) Specify where to look for the ansible-connection script. This location will be checked before searching $PATH. | ||
+ | # If null, ansible will start with the same directory as the ansible script. | ||
+ | ; | ||
+ | |||
+ | # (int) This controls the amount of time to wait for response from remote device before timing out persistent connection. | ||
+ | ; | ||
+ | |||
+ | # (integer) This controls the retry timeout for persistent connection to connect to the local domain socket. | ||
+ | ; | ||
+ | |||
+ | # (integer) This controls how long the persistent connection will remain idle before it is destroyed. | ||
+ | ; | ||
+ | |||
+ | # (path) Path to socket to be used by the connection persistence system. | ||
+ | ; | ||
+ | |||
+ | |||
+ | [connection] | ||
+ | # (boolean) This is a global option, each connection plugin can override either by having more specific options or not supporting pipelining at all. | ||
+ | # Pipelining, if supported by the connection plugin, reduces the number of network operations required to execute a module on the remote server, by executing many Ansible modules without actual file transfer. | ||
+ | # It can result in a very significant performance improvement when enabled. | ||
+ | # However this conflicts with privilege escalation (become). For example, when using & | ||
+ | # This setting will be disabled if ``ANSIBLE_KEEP_REMOTE_FILES`` is enabled. | ||
+ | ; | ||
+ | |||
+ | |||
+ | [colors] | ||
+ | # (string) Defines the color to use on & | ||
+ | ; | ||
+ | |||
+ | # (string) Defines the default color to use for ansible-console | ||
+ | ; | ||
+ | |||
+ | # (string) Defines the color to use when emitting debug messages | ||
+ | ;debug=dark gray | ||
+ | |||
+ | # (string) Defines the color to use when emitting deprecation messages | ||
+ | ; | ||
+ | |||
+ | # (string) Defines the color to use when showing added lines in diffs | ||
+ | ; | ||
+ | |||
+ | # (string) Defines the color to use when showing diffs | ||
+ | ; | ||
+ | |||
+ | # (string) Defines the color to use when showing removed lines in diffs | ||
+ | ; | ||
+ | |||
+ | # (string) Defines the color to use when emitting error messages | ||
+ | ;error=red | ||
+ | |||
+ | # (string) Defines the color to use for highlighting | ||
+ | ; | ||
+ | |||
+ | # (string) Defines the color to use when showing & | ||
+ | ;ok=green | ||
+ | |||
+ | # (string) Defines the color to use when showing & | ||
+ | ;skip=cyan | ||
+ | |||
+ | # (string) Defines the color to use on & | ||
+ | ; | ||
+ | |||
+ | # (string) Defines the color to use when emitting verbose messages. i.e those that show with & | ||
+ | ; | ||
+ | |||
+ | # (string) Defines the color to use when emitting warning messages | ||
+ | ; | ||
+ | |||
+ | |||
+ | [selinux] | ||
+ | # (boolean) This setting causes libvirt to connect to lxc containers by passing --noseclabel to virsh. This is necessary when running on systems which do not have SELinux. | ||
+ | ; | ||
+ | |||
+ | # (list) Some filesystems do not support safe operations and/or return inconsistent errors, this setting makes Ansible & | ||
+ | # Data corruption may occur and writes are not always verified when a filesystem is in the list. | ||
+ | ; | ||
+ | |||
+ | |||
+ | [diff] | ||
+ | # (bool) Configuration toggle to tell modules to show differences when in & | ||
+ | ; | ||
+ | |||
+ | # (integer) How many lines of context to show when displaying the differences between files. | ||
+ | ;context=3 | ||
+ | |||
+ | |||
+ | [galaxy] | ||
+ | # (path) The directory that stores cached responses from a Galaxy server. | ||
+ | # This is only used by the ``ansible-galaxy collection install`` and ``download`` commands. | ||
+ | # Cache files inside this dir will be ignored if they are world writable. | ||
+ | ; | ||
+ | |||
+ | # (bool) whether ``ansible-galaxy collection install`` should warn about ``--collections-path`` missing from configured : | ||
+ | ; | ||
+ | |||
+ | # (path) Collection skeleton directory to use as a template for the ``init`` action in ``ansible-galaxy collection``, | ||
+ | ; | ||
+ | |||
+ | # (list) patterns of files to ignore inside a Galaxy collection skeleton directory | ||
+ | ; | ||
+ | |||
+ | # (bool) Disable GPG signature verification during collection installation. | ||
+ | ; | ||
+ | |||
+ | # (bool) Some steps in ``ansible-galaxy`` display a progress wheel which can cause issues on certain displays or when outputting the stdout to a file. | ||
+ | # This config option controls whether the display wheel is shown or not. | ||
+ | # The default is to show the display wheel if stdout has a tty. | ||
+ | ; | ||
+ | |||
+ | # (path) Configure the keyring used for GPG signature verification during collection installation and verification. | ||
+ | ; | ||
+ | |||
+ | # (boolean) If set to yes, ansible-galaxy will not validate TLS certificates. This can be useful for testing against a server with a self-signed certificate. | ||
+ | ; | ||
+ | |||
+ | # (list) A list of GPG status codes to ignore during GPG signature verification. See L(https:// | ||
+ | # If fewer signatures successfully verify the collection than `GALAXY_REQUIRED_VALID_SIGNATURE_COUNT`, | ||
+ | ; | ||
+ | |||
+ | # (str) The number of signatures that must be successful during GPG signature verification while installing or verifying collections. | ||
+ | # This should be a positive integer or all to indicate all signatures must successfully validate the collection. | ||
+ | # Prepend + to the value to fail if no valid signatures are found for the collection. | ||
+ | ; | ||
+ | |||
+ | # (path) Role skeleton directory to use as a template for the ``init`` action in ``ansible-galaxy``/ | ||
+ | ; | ||
+ | |||
+ | # (list) patterns of files to ignore inside a Galaxy role or collection skeleton directory | ||
+ | ; | ||
+ | |||
+ | # (string) URL to prepend when roles don& | ||
+ | ; | ||
+ | |||
+ | # (list) A list of Galaxy servers to use when installing a collection. | ||
+ | # The value corresponds to the config ini header ``[galaxy_server.{{item}}]`` which defines the server details. | ||
+ | # See : | ||
+ | # The order of servers in this list is used to as the order in which a collection is resolved. | ||
+ | # Setting this config option will ignore the : | ||
+ | ; | ||
+ | |||
+ | # (int) The default timeout for Galaxy API calls. Galaxy servers that don& | ||
+ | ; | ||
+ | |||
+ | # (path) Local path to galaxy access token file | ||
+ | ; | ||
+ | |||
+ | |||
+ | [inventory] | ||
+ | # (string) This setting changes the behaviour of mismatched host patterns, it allows you to force a fatal error, a warning or just ignore it | ||
+ | ; | ||
+ | |||
+ | # (boolean) If & | ||
+ | |||
+ | ; | ||
+ | |||
+ | # (bool) Toggle to turn on inventory caching. | ||
+ | # This setting has been moved to the individual inventory plugins as a plugin option : | ||
+ | # The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory configuration. | ||
+ | # This message will be removed in 2.16. | ||
+ | ; | ||
+ | |||
+ | # (string) The plugin for caching inventory. | ||
+ | # This setting has been moved to the individual inventory plugins as a plugin option : | ||
+ | # The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration. | ||
+ | # This message will be removed in 2.16. | ||
+ | ; | ||
+ | |||
+ | # (string) The inventory cache connection. | ||
+ | # This setting has been moved to the individual inventory plugins as a plugin option : | ||
+ | # The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration. | ||
+ | # This message will be removed in 2.16. | ||
+ | ; | ||
+ | |||
+ | # (string) The table prefix for the cache plugin. | ||
+ | # This setting has been moved to the individual inventory plugins as a plugin option : | ||
+ | # The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration. | ||
+ | # This message will be removed in 2.16. | ||
+ | ; | ||
+ | |||
+ | # (string) Expiration timeout for the inventory cache plugin data. | ||
+ | # This setting has been moved to the individual inventory plugins as a plugin option : | ||
+ | # The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration. | ||
+ | # This message will be removed in 2.16. | ||
+ | ; | ||
+ | |||
+ | # (list) List of enabled inventory plugins, it also determines the order in which they are used. | ||
+ | ; | ||
+ | |||
+ | # (bool) Controls if ansible-inventory will accurately reflect Ansible& | ||
+ | ; | ||
+ | |||
+ | # (list) List of extensions to ignore when using a directory as an inventory source | ||
+ | ; | ||
+ | |||
+ | # (list) List of patterns to ignore when using a directory as an inventory source | ||
+ | ; | ||
+ | |||
+ | # (bool) If & | ||
+ | |||
+ | ; | ||
+ | |||
+ | # (boolean) By default Ansible will issue a warning when no inventory was loaded and notes that it will use an implicit localhost-only inventory. | ||
+ | # These warnings can be silenced by adjusting this setting to False. | ||
+ | ; | ||
+ | |||
+ | |||
+ | [netconf_connection] | ||
+ | # (string) This variable is used to enable bastion/ | ||
+ | ; | ||
+ | |||
+ | |||
+ | [paramiko_connection] | ||
+ | # (boolean) TODO: write it | ||
+ | ; | ||
+ | |||
+ | # (boolean) TODO: write it | ||
+ | ; | ||
+ | |||
+ | # (float) Configures, in seconds, the amount of time to wait for the SSH banner to be presented. This option is supported by paramiko version 1.15.0 or newer. | ||
+ | ; | ||
+ | |||
+ | # (boolean) Set this to & | ||
+ | ; | ||
+ | |||
+ | # (int) Remote port to connect to. | ||
+ | ; | ||
+ | |||
+ | # (string) Path to private key file to use for authentication. | ||
+ | ; | ||
+ | |||
+ | # (string) Proxy information for running the connection via a jumphost | ||
+ | # Also this plugin will scan & | ||
+ | ; | ||
+ | |||
+ | # (boolean) SUDO usually requires a PTY, True to give a PTY and False to not give a PTY. | ||
+ | ;pty=True | ||
+ | |||
+ | # (boolean) Save the host keys to a file | ||
+ | ; | ||
+ | |||
+ | # (string) User to login/ | ||
+ | # Can be set from the CLI via the C(--user) or C(-u) options. | ||
+ | ; | ||
+ | |||
+ | # (int) Number of seconds until the plugin gives up on failing to establish a TCP connection. | ||
+ | ;timeout=10 | ||
+ | |||
+ | # (boolean) Whether or not to enable RSA SHA2 algorithms for pubkeys and hostkeys | ||
+ | # On paramiko versions older than 2.9, this only affects hostkeys | ||
+ | # For behavior matching paramiko& | ||
+ | ; | ||
+ | |||
+ | |||
+ | [jinja2] | ||
+ | # (list) This list of filters avoids & | ||
+ | # Useful when you want to avoid conversion into lists or dictionaries for JSON strings, for example. | ||
+ | ; | ||
+ | |||
+ | |||
+ | [tags] | ||
+ | # (list) default list of tags to run in your plays, Skip Tags has precedence. | ||
+ | ;run= | ||
+ | |||
+ | # (list) default list of tags to skip in your plays, has precedence over Run Tags | ||
+ | ;skip= | ||
+ | |||
+ | |||
+ | [runas_become_plugin] | ||
+ | # (string) Options to pass to runas, a space delimited list of k=v pairs | ||
+ | ;flags= | ||
+ | |||
+ | # (string) password | ||
+ | ;password= | ||
+ | |||
+ | # (string) User you & | ||
+ | ;user= | ||
+ | |||
+ | |||
+ | [su_become_plugin] | ||
+ | # (string) Su executable | ||
+ | ; | ||
+ | |||
+ | # (string) Options to pass to su | ||
+ | ;flags= | ||
+ | |||
+ | # (string) Password to pass to su | ||
+ | ;password= | ||
+ | |||
+ | # (string) User you & | ||
+ | ;user=root | ||
+ | |||
+ | # (list) List of localized strings to match for prompt detection | ||
+ | # If empty we& | ||
+ | # Do NOT add a colon (:) to your custom entries. Ansible adds a colon at the end of each prompt; if you add another one in your string, your prompt will fail with a & | ||
+ | ; | ||
+ | |||
+ | |||
+ | [sudo_become_plugin] | ||
+ | # (string) Sudo executable | ||
+ | ; | ||
+ | |||
+ | # (string) Options to pass to sudo | ||
+ | ;flags=-H -S -n | ||
+ | |||
+ | # (string) Password to pass to sudo | ||
+ | ;password= | ||
+ | |||
+ | # (string) User you & | ||
+ | ;user=root | ||
+ | |||
+ | |||
+ | [callback_tree] | ||
+ | # (path) directory that will contain the per host JSON files. Also set by the C(--tree) option when using adhoc. | ||
+ | ; | ||
+ | |||
+ | |||
+ | [ssh_connection] | ||
+ | # (string) Only used in parsing ProxyCommand for use in this plugin. | ||
+ | ;ssh_args= | ||
+ | |||
+ | # (string) Only used in parsing ProxyCommand for use in this plugin. | ||
+ | ; | ||
+ | |||
+ | # (string) Only used in parsing ProxyCommand for use in this plugin. | ||
+ | ; | ||
+ | |||
+ | # (string) This is the location to save SSH& | ||
+ | # Since 2.3, if null (default), ansible will generate a unique hash. Use ``%(directory)s`` to indicate where to use the control dir path setting. | ||
+ | # Before 2.3 it defaulted to ``control_path=%(directory)s/ | ||
+ | # Be aware that this setting is ignored if C(-o ControlPath) is set in ssh args. | ||
+ | ; | ||
+ | |||
+ | # (string) This sets the directory to use for ssh control path if the control path setting is null. | ||
+ | # Also, provides the ``%(directory)s`` variable for the control path setting. | ||
+ | ; | ||
+ | |||
+ | # (boolean) Determines if SSH should check host keys. | ||
+ | ; | ||
+ | |||
+ | # (boolean) Pipelining reduces the number of connection operations required to execute a module on the remote server, by executing many Ansible modules without actual file transfers. | ||
+ | # This can result in a very significant performance improvement when enabled. | ||
+ | # However this can conflict with privilege escalation (become). For example, when using sudo operations you must first disable & | ||
+ | ; | ||
+ | |||
+ | # (string) PKCS11 SmartCard provider such as opensc, example: / | ||
+ | # Requires sshpass version 1.06+, sshpass must support the -P option. | ||
+ | ; | ||
+ | |||
+ | # (integer) Number of attempts to connect. | ||
+ | # Ansible retries connections only if it gets an SSH error with a return code of 255. | ||
+ | # Any errors with return codes other than 255 indicate an issue with program execution. | ||
+ | ;retries=0 | ||
+ | |||
+ | # (string) This defines the location of the scp binary. It defaults to V(scp) which will use the first binary available in $PATH. | ||
+ | ; | ||
+ | |||
+ | # (string) Extra exclusive to the C(scp) CLI | ||
+ | ; | ||
+ | |||
+ | # (string) Preferred method to use when transferring files over SSH. | ||
+ | # When set to V(smart), Ansible will try them until one succeeds or they all fail. | ||
+ | # If set to V(True), it will force & | ||
+ | # For OpenSSH & | ||
+ | # This setting will overridden by O(ssh_transfer_method) if set. | ||
+ | ; | ||
+ | |||
+ | # (bool) TODO: write it | ||
+ | ; | ||
+ | |||
+ | # (string) This defines the location of the sftp binary. It defaults to V(sftp) which will use the first binary available in $PATH. | ||
+ | ; | ||
+ | |||
+ | # (string) Extra exclusive to the C(sftp) CLI | ||
+ | ; | ||
+ | |||
+ | # (string) This defines the location of the SSH binary. It defaults to V(ssh) which will use the first SSH binary available in $PATH. | ||
+ | # This option is usually not required, it might be useful when access to system SSH is restricted, or when using SSH wrappers to connect to remote hosts. | ||
+ | ; | ||
+ | |||
+ | # (string) Preferred method to use when transferring files over ssh | ||
+ | # Setting to & | ||
+ | # For OpenSSH & | ||
+ | # Using & | ||
+ | ; | ||
+ | |||
+ | # (string) Password prompt that sshpass should search for. Supported by sshpass 1.06 and up. | ||
+ | # Defaults to C(Enter PIN for) when pkcs11_provider is set. | ||
+ | ; | ||
+ | |||
+ | # (integer) This is the default amount of time we will wait while establishing an SSH connection. | ||
+ | # It also controls how long we can wait to access reading the connection once established (select on the socket). | ||
+ | ;timeout=10 | ||
+ | |||
+ | # (bool) add -tt to ssh commands to force tty allocation. | ||
+ | ; | ||
+ | |||
+ | |||
+ | [winrm] | ||
+ | # (list) A list of environment variables to pass through to C(kinit) when getting the Kerberos authentication ticket. | ||
+ | # By default no environment variables are passed through and C(kinit) is run with a blank slate. | ||
+ | # The environment variable C(KRB5CCNAME) cannot be specified here as it& | ||
+ | ; | ||
+ | |||
+ | |||
+ | [inventory_plugins] | ||
+ | # (bool) Merge extra vars into the available variables for composition (highest precedence). | ||
+ | ; | ||
+ | |||
+ | |||
+ | [inventory_plugin_script] | ||
+ | # (boolean) Toggle display of stderr even when script was successful | ||
+ | ; | ||
+ | |||
+ | |||
+ | [inventory_plugin_yaml] | ||
+ | # (list) list of & | ||
+ | ; | ||
+ | |||
+ | |||
+ | [url_lookup] | ||
+ | # (string) String of file system path to CA cert bundle to use | ||
+ | ;ca_path= | ||
+ | |||
+ | # (list) SSL/TLS Ciphers to use for the request | ||
+ | # When a list is provided, all ciphers are joined in order with C(:) | ||
+ | # See the L(OpenSSL Cipher List Format, | ||
+ | # The available ciphers is dependent on the Python and OpenSSL/ | ||
+ | ;ciphers= | ||
+ | |||
+ | # (string) String of urllib2, all/yes, safe, none to determine how redirects are followed, see RedirectHandlerFactory for more information | ||
+ | ; | ||
+ | |||
+ | # (boolean) Whether or not to set & | ||
+ | ; | ||
+ | |||
+ | # (boolean) Force basic authentication | ||
+ | ; | ||
+ | |||
+ | # (string) User-Agent to use in the request. The default was changed in 2.11 to V(ansible-httpget). | ||
+ | ; | ||
+ | |||
+ | # (float) How long to wait for the server to send data before giving up | ||
+ | ;timeout=10 | ||
+ | |||
+ | # (string) String of file system path to unix socket file to use when establishing connection to the provided url | ||
+ | ; | ||
+ | |||
+ | # (list) A list of headers to not attach on a redirected request | ||
+ | ; | ||
+ | |||
+ | # (boolean) Use GSSAPI handler of requests | ||
+ | # As of Ansible 2.11, GSSAPI credentials can be specified with O(username) and O(password). | ||
+ | ; | ||
+ | |||
+ | # (boolean) Determining whether to use credentials from ``~/ | ||
+ | # By default .netrc is used with Basic authentication headers | ||
+ | # When set to False, .netrc credentials are ignored | ||
+ | ; | ||
+ | |||
+ | |||
+ | [powershell] | ||
+ | # (string) Directory in which ansible will keep async job information. | ||
+ | # Before Ansible 2.8, this was set to C(remote_tmp + & | ||
+ | ; | ||
+ | |||
+ | # (string) Temporary directory to use on targets when copying files to the host. | ||
+ | ; | ||
+ | |||
+ | |||
+ | [vars_host_group_vars] | ||
+ | # (str) Control when this vars plugin may be executed. | ||
+ | # Setting this option to V(all) will run the vars plugin after importing inventory and whenever it is demanded by a task. | ||
+ | # Setting this option to V(task) will only run the vars plugin whenever it is demanded by a task. | ||
+ | # Setting this option to V(inventory) will only run the vars plugin after parsing inventory. | ||
+ | # If this option is omitted, the global C(RUN_VARS_PLUGINS) configuration is used to determine when to execute the vars plugin. | ||
+ | ;stage= | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ==== 設定ファイルの検索順序 ==== | ||
+ | 公式: [[https:// | ||
+ | * < | ||
+ | * < | ||
+ | * < | ||
+ | * < | ||
+ | |||
+ | ===== Ansible playbooks ===== | ||
+ | 公式: [[https:// | ||
+ | |||
+ | 公式: [[https:// | ||
+ | サンプル: | ||
+ | テンプレート: | ||
+ | [[https:// | ||
+ | |||
+ | ====== Ansible AWX ====== | ||
+ | 公式: [[git> | ||
+ | ドキュメント: | ||
+ | |||
+ | ====== 参考文献 ====== | ||
+ | [[https:// | ||