Difference between revisions of "Ansible user"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | {{lc}} | |
[[ansible-playbook]] -u REMOTE_USER | [[ansible-playbook]] -u REMOTE_USER | ||
Line 15: | Line 15: | ||
+ | [my_new_group2] | ||
+ | myhost5 | ||
+ | myhost6 | ||
+ | myhost7 [[ansible_user]]=OTHER_USENAME | ||
+ | |||
+ | [my_new_group2:vars] | ||
+ | [[ansible_ssh_private_key_file]]=~/.ssh/path_to_private_key | ||
+ | |||
+ | == Related == | ||
+ | [[ansible_ssh_private_key_file]] | ||
== See also == | == See also == |
Latest revision as of 18:31, 16 January 2023
ansible-playbook -u REMOTE_USER
Example[edit]
Defining specific user for some group of hosts:
[my_new_group] myhost1 myhost1 myhost3 myhost4 ansible_user=OTHER_USENAME [my_new_group:vars] ansible_user=sysadm
[my_new_group2] myhost5 myhost6 myhost7 ansible_user=OTHER_USENAME [my_new_group2:vars] ansible_ssh_private_key_file=~/.ssh/path_to_private_key
Related[edit]
ansible_ssh_private_key_file
See also[edit]
- Ansible modules:
gather_facts, set_fact
,ansible.builtin.file
,lineinfile
,stat
,group
,mount
,git:
,package:
,command:
,shell:
,raw:
,template:
,register:
,user:
, Ansible playbooks examples,tasks:
,lineinfile, blockinfile:
,shell:
,command:
,raw:
,ansible.builtin.file, service:, aws.ecs_taskdefinition, aws.asg, docker_container, kubernetes.core.k8s
,community.
,include_tasks
- Ansible: modules, plugins, Playbooks (examples)
ansible-playbook
,ansible-vault
,ansible-inventory
,ansible-config
, Ansible Tower, Ansible Galaxy (Roles) (ansible-galaxy
),ansible-cmdb
,gather facts
,ansible.cfg
,Ansible Molecule
, Ansible collections,register
,template
,--ask-pass
,--ask-become-pass
,remote_user:
,/etc/ansible/hosts
,ansible-doc
,ansible-lint
,.ansible/
,--forks
,--start-at-task
,changelog
,inventory
,Notify:
,ansible HOSTNAME -m ping
,gathering
,/usr/bin/ansible
,ansible -m ping
,ansible.builtin
,hosts: (Ansible)
,set fact:
,when:
,blockinfile:
,become method:
,include:
,git:
, AWX,ansible --help
, Tags, Ansible variables, versions
Advertising: