OneIdentity / ansible-authentication-services

Ansible automation for Authentication Services
Apache License 2.0
10 stars 7 forks source link

Force Join using ansible. #31

Open Ansible-NOOB opened 1 year ago

Ansible-NOOB commented 1 year ago

Is there a way to force rejoin to a domain where the computer object is still in the domain.

As in MCU I could use the -f option but everything I try in Ansible seems to fail.

Example of my playbook with the variables I thought would work but always fail.


llnagy76 commented 1 year ago

Hi, I have examined the source of client join role and seen there that the -f option is always added to the vastool join command. So if that is the only extra argument you would like to use then you do not need to use the client_join_extra_args variable.

Unfortunately I can not reproduce your issue in my test environment. Could we investigate your problem together? Please rerun your playbook, this time with the -vvv option and redirect the output to a file: ansible-playbook -i inventory.yml run_client_join.yml -vvv &> client_join_result.txt Then please attach the output file.

Ansible-NOOB commented 1 year ago

Could we investigate your problem together? - Sure with as much information I am allowed to share

Sadly I can't provide that output as it has information, I am unable to share.

And yes I have verified that it does seem to use the -f option when joining thanks for that confirmation.

llnagy76 commented 1 year ago

Could it be possible to replace / delete the sensitive information in the output file? This way you would not share information you are not allowed to share but I could examine the output in order to find the cause of problem.

Ansible-NOOB commented 1 year ago

I will take a look at the output and see if what I can do.

BUT

ansible-playbook -i inventory.yml run_client_join.yml -vvv &> client_join_result.txt

I don't have a playbook that is called inventory.yml and when I run the command it just gave errors that it couldn't parse that file.

I am assuming that is not what you are looking for.

But TBH since -f is always added then this issue can be closed as I was trying to add it manually which seems to of led to the issue of me adding it as an extra arg var.

llnagy76 commented 1 year ago

ansible-playbook -i inventory.yml run_client_join.yml -vvv &> client_join_result.txt is just an example. What is important there is the redirection to the client_join_result.txt file. I do now know exactly how you run your playbooks, what the name of your inventrory file or your playbook file is. You should substitute inventory.yml to your inventory file in your command.