Answers for "how to use tags in ansible"

2

ansible tags

ansible-playbook example.yml --tags "configuration,packages"
Posted by: Guest on June-29-2020
1

ansible tags

tasks:
- yum:
    name:
    - httpd
    - memcached
    state: present
  tags:
  - packages

- template:
    src: templates/src.j2
    dest: /etc/foo.conf
  tags:
  - configuration
Posted by: Guest on June-29-2020
0

how to use tags in ansible

# Tags goes at same indentation as name or service: 
- name: Create Postgres Container 
  tags: createcontainer
  docker_container:
    name: mypostgres
    ...
# Then in the command line:
ansible-playbook myplaybook.yaml --tags createcontainer
Posted by: Guest on March-09-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language