Open jomeier opened 6 years ago
I found out that there where lines like this in the test.json file:
...
{
"asset_type": "user"
}
...
If I add the two properties "username" and "email" to something like this:
...
{
"username": "admin",
"email": "dudu@duduhome.com",
"asset_type": "user"
}
...
the import works.
Is this the expected behaviour ?
Why are the user names not exported?
Lot's of objects are connected to a certain user. If they are not known to tower, the import will not work at all.
@jomeier, This is strange behavior. In the version information you listed, is that the server you are exporting out of, importing into, or both? The user is correctly exported for me (see below) so I want to check using the same versions as you. Also, can you try to download and build tower-cli from source to see if you are still getting the same issue.
tower-cli receive --user admin --tower-host http://localhost:8081
[
{
"username": "admin",
"first_name": "",
"last_name": "",
"email": "admin@example.com",
"is_superuser": true,
"asset_type": "user"
}
]
@john-westcott-iv Yes you are right: I exported the user data from the same AWX version I tried to import it afterwards. I expected to get it working.
I also tried out to clear all AWX data with
tower-cli empty --all
before reimporting the formerly exported data. Same results.
After building tower-cli from source with
sudo make install
I get the same weird behaviour as described in my initial issue.
A fresh installation of AWX V1.0.7.2 shows the same behaviour.
tower-cli receive --user admin
[
{
"asset_type": "user"
}
]
Also seeing this on a fresh pip install ansible-tower-cli
and latest docker awx setup.
This is my PR which exports more user attributes. Makes the import work again.
Seems like a bug in AWX API, which I myself noticed in 1.0.7.2 and that seems fixed in 2.0.1?
see for more details: https://github.com/ansible/tower-cli/pull/586#issuecomment-432176155
For my data migration from awx 2.0.1 to 9.1.0 with tower-cli 3.3.7, this issue still exists
For my data migration from awx 2.0.1 to 9.1.0 with tower-cli 3.3.7, this issue still exists
I am in the same boat still to with similar versions. AWX 2.1.2.0 tower-cli 3.3.8
Hi,
today I tried out the export / import feature of tower-cli.
I installed the latest awx version on my machine. I started it and waited until it was accessible through the web ui. I logged in.
On the command line I exported all settings like this:
test.json was filled with data.
Afterwards I imported this data again to the same instance of AWX like this:
I get this error message:
I appended the test.json file.
Best regards,
Josef
test.txt
Versions: Tower CLI 3.3.0 API v2 AWX 1.0.6.41 Ansible 2.6.1