Hello,

I try to run a deployment Playbook with some roles like bootstraping, user and ssh server.
The configuration for hosts I put in host_vars folder.

The host file:

ansible_user: "vagrant"
ansible_pass: "vagrant"
ansible_ssh_pass: "vagrant"
ansible_become_pass: "vagrant"
ansible_port: "22"


The playbook:

- name: Deploy the server
  hosts: vb_deb
  become: yes
  gather_facts: yes
  strategy: free
  tasks:
    - name: Let us bootstraping the server
      ansible.builtin.include_role:
        name: core_bootstrap
    - name: Let us install core packages
      ansible.builtin.include_role:
        name: core_packages
    - name: Let us create the user on server
      ansible.builtin.include_role:
        name: core_users
    - name: Let us install and configure the OpenSSH Server
      ansible.builtin.include_role:
        name: core_openssh

So now I had the problem the ssh user and the ssh port change to my username and 12000 for SSH.

How can I delete the variables (ansible_pass, ansible_ssh_pass, ansible_become_pass, ansible_port) in host_vars file with ansible so that the default settings be used and I can run the next role?


Thank you for help.

Silvio

--
You received this message because you are subscribed to the Google Groups "Ansible 
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/abe3044d-cdfb-2c34-2e44-68b8b00bb03c%40gmail.com.

Reply via email to