Sha256: e85ef6bf773c0619452f3443c6c8294f5015e4aba9e6c927a3c3b78840bb0a65

Contents?: true

Size: 1.63 KB

Versions: 42

Compression:

Stored size: 1.63 KB

Contents

Configuration
=============

Configuration is expected to be placed in one of hammer's configuration directories for plugins:
- `/etc/hammer/cli.modules.d/`
- `~/.hammer/cli.modules.d/`
- `./.config/cli.modules.d/` (config dir in CWD)

If you install `hammer_cli_foreman` from source you'll have to copy the config file manually
from `config/foreman.yml`.

See our [sample config file](https://github.com/theforeman/hammer-cli-foreman/blob/master/config/foreman.yml)
that lists all available configuration options with descriptions.

## Authentication
### Basic auth
Basic authentication with username and password is currently the only supported method.

You can save your credentials into hammer config file in your home directory:
`~/.hammer/cli.modules.d/foreman.yml`
```yaml
:foreman:
  :username: 'admin'
  :password: 'example'
```

Credentials can be passed directly on the command line too:
```bash
hammer -u admin -p example ...
```

If there are no credentials in neither config files nor command line, hammer asks for them interactively:
```
>> hammer host list
[Foreman] Username: admin
[Foreman] Password for admin:
...
```

**Sessions**

Hammer supports session authentication to reduce the need of entering credentials for each command.
It's disabled by default. To turn it on, put following into your config file:
```yaml
:foreman:
  :use_sessions: true
```
Please note that when you turn sessions on, the credentials stored in your config file will be ignored.

The default session timeout is 1 hour. This can be changed in the Foreman: `Settings > Authentication > Idle timeout`
When the session expires hammer will prompt for username and password again.

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
hammer_cli_foreman-3.2.0 doc/configuration.md
hammer_cli_foreman-2.5.2 doc/configuration.md
hammer_cli_foreman-3.1.0 doc/configuration.md
hammer_cli_foreman-3.0.0 doc/configuration.md
hammer_cli_foreman-2.5.1 doc/configuration.md
hammer_cli_foreman-2.5.0 doc/configuration.md
hammer_cli_foreman-2.3.2 doc/configuration.md
hammer_cli_foreman-2.4.0 doc/configuration.md
hammer_cli_foreman-2.3.1 doc/configuration.md
hammer_cli_foreman-2.3.0 doc/configuration.md
hammer_cli_foreman-2.1.3 doc/configuration.md
hammer_cli_foreman-2.2.0 doc/configuration.md
hammer_cli_foreman-2.1.2 doc/configuration.md
hammer_cli_foreman-2.1.1 doc/configuration.md
hammer_cli_foreman-2.1.0 doc/configuration.md
hammer_cli_foreman-2.0.2 doc/configuration.md
hammer_cli_foreman-2.0.1 doc/configuration.md
hammer_cli_foreman-2.0.0 doc/configuration.md
hammer_cli_foreman-0.19.7 doc/configuration.md
hammer_cli_foreman-0.19.6 doc/configuration.md