Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force Join using ansible. #31

Open
Ansible-NOOB opened this issue Oct 17, 2022 · 5 comments
Open

Force Join using ansible. #31

Ansible-NOOB opened this issue Oct 17, 2022 · 5 comments

Comments

@Ansible-NOOB
Copy link

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.


  • hosts: all
    gather_facts: false

    The variables you would most likely want/need to override have been included

    vars:

    Active Directory

    client_join_state: joined
    client_join_extra_args: -f
    client_domain: MYDOMAIN
    client_username: MYUSERNAME
    client_password: MYPASSWORD

@llnagy76
Copy link
Contributor

llnagy76 commented Nov 3, 2022

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
Copy link
Author

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
Copy link
Contributor

llnagy76 commented Nov 9, 2022

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
Copy link
Author

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
Copy link
Contributor

llnagy76 commented Nov 10, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants