Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Add support for Clear linux #55

Merged
merged 5 commits into from
Sep 19, 2018
Merged

Add support for Clear linux #55

merged 5 commits into from
Sep 19, 2018

Conversation

bswinnerton
Copy link
Contributor

@bswinnerton bswinnerton commented Sep 17, 2018

Building on paulfantom/dockerfiles#2, this pull request adds support for Clear Linux, a lightweight auto-updating distribution of Linux.

Clear Linux has one dependency: the sysadmin-basic "bundle". Bundles are how packages are installed in Clear Linux, and sysadmin-basic includes getcap. This dependency was added to the vars/clearlinux.yml file.

I also had to add a task to ensure that /usr/local/bin is present, as it's not always in Clear Linux.

And lastly, as outlined in 94c3edd, I had to update the with_first_round to use ansible_distribution_file_variety, due to the way that Clear Linux returns ansible_distribution / ansible_os_family values for Ansible 2.4. Once support for Ansible 2.4 is dropped, we can remove that line.

@bswinnerton bswinnerton reopened this Sep 18, 2018
@bswinnerton
Copy link
Contributor Author

bswinnerton commented Sep 18, 2018

I don't have push access to this repository, so I can't rebuild jobs in Travis. I closed and reopened the pull request to trigger a new webhook to be pushed to Travis. Once I did, I noticed a failure:

failed: [clearlinux] (item=None) => {"changed": false, "item": null, "module_stderr": "/bin/sh: sudo: command not found\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 127}

I've opened a pull request in paulfantom/dockerfiles#3 to resolve the sudo error.

@bswinnerton
Copy link
Contributor Author

Going to close and reopen the PR one more time to kick off a new CI build.

This is especially helpful for Clear Linux which may not already have
the directory.
This helps with Clear Linux when using Ansible 2.4. Once support is
dropped for 2.4, this line will no longer be needed.

When using Clear Linux with Ansible 2.4, you would see facts that look
like this:

```
root@3ca7751f8d6c / # ansible -m setup localhost | grep distribution
 [WARNING]: Unable to parse /etc/ansible/hosts as an inventory source
 [WARNING]: No inventory was parsed, only implicit localhost is
available
 [WARNING]: Could not match supplied host pattern, ignoring: all
 [WARNING]: provided hosts list is empty, only localhost is available
        "ansible_distribution": "NAME=\"Clear",
        "ansible_distribution_file_parsed": true,
        "ansible_distribution_file_path": "/usr/lib/os-release",
        "ansible_distribution_file_variety": "ClearLinux",
        "ansible_distribution_major_version": "25020",
        "ansible_distribution_release": "clear-linux-os",
        "ansible_distribution_version": "25020",
```

Oddly, the `ansible_distribution` (and `ansible_os_family`) is not
correct, but _is_ correct in subsequent versions like 2.5 and 2.6:

```
root@3ca7751f8d6c / # ansible -m setup localhost | grep distribution
 [WARNING]: Unable to parse /etc/ansible/hosts as an inventory source
 [WARNING]: No inventory was parsed, only implicit localhost is
available
 [WARNING]: provided hosts list is empty, only localhost is available.
Note that the implicit localhost does not match 'all'
        "ansible_distribution": "ClearLinux",
        "ansible_distribution_file_parsed": true,
        "ansible_distribution_file_path": "/usr/lib/os-release",
        "ansible_distribution_file_search_string": "Clear Linux",
        "ansible_distribution_file_variety": "ClearLinux",
        "ansible_distribution_major_version": "25020",
        "ansible_distribution_release": "clear-linux-os",
        "ansible_distribution_version": "25020",

root@3ca7751f8d6c / # ansible -m setup localhost | grep ansible_os
 [WARNING]: Unable to parse /etc/ansible/hosts as an inventory source
 [WARNING]: No inventory was parsed, only implicit localhost is
available
 [WARNING]: provided hosts list is empty, only localhost is available.
Note that the implicit localhost does not match 'all'
        "ansible_os_family": "ClearLinux",
```

This commit updates the vars to use something that will support Clear
Linux with Ansible version 2.4.
@bswinnerton
Copy link
Contributor Author

@paulfantom, I know you had requested to rebase against master in IRC, but I think this branch is already up to date with master.

@paulfantom paulfantom merged commit b946468 into cloudalchemy:master Sep 19, 2018
@bswinnerton bswinnerton deleted the clear-linux branch September 19, 2018 13:08
@lock
Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants