I am trying to run Ansible playbook from my gitlab-pipeline. But I am getting an error "Invalid/incorrect password: Permission denied, please try again."
Here is my GitLab-ci pipeline
before_script:
- ssh-keyscan <serverip>
- echo "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
job1:
tags:
- xyz
script:
- echo $CI_PROJECT_DIR
- cd $CI_PROJECT_DIR/scripts
- ./bashscript.sh
- echo "Completed"
bashscript.sh contains ansible command "ansible-playbook test.yml" and test.yml
- hosts: all
gather_facts: yes
name: checking host
tasks:
- name: "Check if the machine is connecting to host"
shell: echo "Hi"
question from:
https://stackoverflow.com/questions/65895594/running-ansible-playbook-from-gitlab-ci-pipe-line 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…