@ansible-flow/assets 1.0.1-rc.1 → 1.0.1-rc.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Ansible Flow Designer files a host passes by path: the Python probe, the run events callback, the JSON schemas, the contract with Ansible Flow Server and the sample projects.
4
4
 
5
- Built from [Ansible Flow Designer](https://github.com/ChistokhinSV/ansible-flow-designer) 1.0.1-rc.1
5
+ Built from [Ansible Flow Designer](https://github.com/ChistokhinSV/ansible-flow-designer) 1.0.1-rc.10
6
6
  and released with it. The folders are found by path: `import { probeDir, schemaDir, contractDir, samplesDir } from '@ansible-flow/assets'`.
7
7
 
8
8
  What is in the package, which entry points are documented and what may change:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ansible-flow/assets",
3
- "version": "1.0.1-rc.1",
3
+ "version": "1.0.1-rc.10",
4
4
  "description": "Ansible Flow Designer files a host passes by path: the Python probe, the run events callback, the JSON schemas, the contract with Ansible Flow Server and the sample projects.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/ChistokhinSV/ansible-flow-designer/blob/main/docs/packages.md",
@@ -5,7 +5,7 @@ flow:
5
5
  key: edge-baseline
6
6
  name: Edge baseline
7
7
  version: 3
8
- goal: All edge switches at a site get the NTP, AAA and syslog baseline, with a backup taken first and automatic
8
+ goal: All edge switches at a site get the NTP and AAA baseline, with a backup taken first and automatic
9
9
  rollback if validation fails.
10
10
  owner: netops
11
11
  runtime:
@@ -29,48 +29,54 @@ nodes:
29
29
  key: precheck
30
30
  type: task
31
31
  title: Pre-checks
32
- status: specified
33
- intent: Verify reachability and current OS version
32
+ status: implemented
33
+ intent: Make each switch's report folder (the sample's switches are simulated with files)
34
34
  inputs:
35
35
  devices:
36
36
  type: host_list
37
37
  from: flow.devices
38
- outputs:
39
- precheck_report:
40
- type: dict
41
- impl: null
38
+ impl:
39
+ kind: module
40
+ ref: ansible.builtin.file
41
+ params:
42
+ path: /tmp/edge-baseline/{{ inventory_hostname }}
43
+ state: directory
44
+ mode: '0755'
45
+ keywords:
46
+ check_mode: false
42
47
  - id: 01JBNPZX45HY43KWJRP1XPA7Z3
43
48
  key: backup-config
44
49
  type: task
45
50
  title: Backup config
46
- status: specified
47
- intent: Save running config to Git
51
+ status: implemented
52
+ intent: Save the running config (the sample's netops_backup role)
48
53
  inputs:
49
54
  devices:
50
55
  type: host_list
51
56
  from: flow.devices
52
- outputs:
53
- backup_ref:
54
- type: string
55
- impl: null
57
+ impl:
58
+ kind: role
59
+ ref: netops_backup
60
+ params:
61
+ out_dir: /tmp/edge-baseline
56
62
  - id: 01JBDJ8FSSZ5AWSH8VHTPRE95B
57
63
  key: push-baseline
58
- type: subflow
64
+ type: task
59
65
  title: Push baseline
60
66
  status: implemented
61
- intent: Apply NTP, AAA and syslog baseline
67
+ intent: Apply the NTP and AAA baseline (the sample's push_baseline role)
62
68
  inputs:
63
69
  devices:
64
70
  type: host_list
65
- backup_ref:
66
- type: string
67
- from: backup-config.backup_ref
68
- outputs:
69
- change_report:
70
- type: dict
71
+ from: flow.devices
71
72
  impl:
72
73
  kind: role
73
- ref: netops.baseline.push_ntp_aaa
74
+ ref: push_baseline
75
+ params:
76
+ out_dir: /tmp/edge-baseline
77
+ ntp_servers:
78
+ - 192.0.2.10
79
+ - 192.0.2.11
74
80
  - id: 01JB9EE0ZBGJ09TQM83XSSSS6Y
75
81
  key: validate
76
82
  type: task
@@ -80,20 +86,14 @@ nodes:
80
86
  inputs:
81
87
  devices:
82
88
  type: host_list
83
- change_report:
84
- type: dict
85
- from: push-baseline.change_report
89
+ from: flow.devices
86
90
  impl: null
87
91
  - id: 01JBS3C4DWA7N36096Q14DR9GP
88
92
  key: rollback
89
93
  type: task
90
94
  title: Rollback
91
- status: specified
95
+ status: draft
92
96
  intent: Restore backup on failed hosts
93
- inputs:
94
- backup_ref:
95
- type: string
96
- from: backup-config.backup_ref
97
97
  impl: null
98
98
  - id: 01JBQY77ZXYYK596NGYA1DQ91K
99
99
  key: done
@@ -1,5 +1,5 @@
1
1
  {
2
- "$comment": "Sample projects (AFD-290): what a new project gets when it starts from a sample, in a project's layout. `from` is a file or folder under samples/, `to` the path in the project (empty: the project's root). Ansible Flow Server reads this from @ansible-flow/assets.",
2
+ "$comment": "Sample projects (AFD-290): what a new project gets when it starts from a sample, in a project's layout. `from` is a file or folder under samples/, `to` the path in the project (empty: the project's root). `launchConfigs` (AFD-322): the launch configurations Ansible Flow Server makes with the project, so its flow runs at once (check mode unless `mode` says real; inputs are never secrets). Ansible Flow Server reads this from @ansible-flow/assets.",
3
3
  "projects": [
4
4
  {
5
5
  "key": "hello",
@@ -9,16 +9,34 @@
9
9
  { "from": "hello.flow.yaml", "to": "flows/hello/hello.flow.yaml" },
10
10
  { "from": "hello.scenarios.yaml", "to": "flows/hello/hello.scenarios.yaml" },
11
11
  { "from": "inventory.ini", "to": "inventory.ini" }
12
+ ],
13
+ "launchConfigs": [
14
+ {
15
+ "name": "Hello on localhost",
16
+ "description": "Says hello from the machine the run is on (the local connection).",
17
+ "flowFile": "flows/hello/hello.flow.yaml",
18
+ "inventory": "inventory.ini",
19
+ "inputs": { "devices": ["localhost"] }
20
+ }
12
21
  ]
13
22
  },
14
23
  {
15
24
  "key": "edge-baseline",
16
25
  "name": "Edge baseline",
17
- "description": "NTP, AAA and syslog baseline for edge switches with a backup first and rollback, and the playbooks and roles it binds (fictional switches, simulated locally).",
26
+ "description": "NTP and AAA baseline for edge switches with a backup first and rollback, and the roles it binds (fictional switches, simulated with files under /tmp/edge-baseline).",
18
27
  "files": [
19
28
  { "from": "edge-baseline.flow.yaml", "to": "flows/edge-baseline/edge-baseline.flow.yaml" },
20
29
  { "from": "edge-baseline.scenarios.yaml", "to": "flows/edge-baseline/edge-baseline.scenarios.yaml" },
21
30
  { "from": "playbooks/edge-baseline", "to": "" }
31
+ ],
32
+ "launchConfigs": [
33
+ {
34
+ "name": "Edge switches (simulated)",
35
+ "description": "The four fictional switches of inventory.ini; a run writes files under /tmp/edge-baseline instead of configuring devices.",
36
+ "flowFile": "flows/edge-baseline/edge-baseline.flow.yaml",
37
+ "inventory": "inventory.ini",
38
+ "inputs": { "devices": ["edge"], "site": "lab" }
39
+ }
22
40
  ]
23
41
  },
24
42
  {
@@ -28,6 +46,15 @@
28
46
  "files": [
29
47
  { "from": "firewall-upgrade.flow.yaml", "to": "flows/firewall-upgrade/firewall-upgrade.flow.yaml" },
30
48
  { "from": "inventory.ini", "to": "inventory.ini" }
49
+ ],
50
+ "launchConfigs": [
51
+ {
52
+ "name": "Skeleton on localhost",
53
+ "description": "The drafts as a skeleton on localhost: a check run passes the change approval by itself; a real run waits for a decision.",
54
+ "flowFile": "flows/firewall-upgrade/firewall-upgrade.flow.yaml",
55
+ "inventory": "inventory.ini",
56
+ "inputs": { "devices": ["localhost"], "target_version": "7.4.3" }
57
+ }
31
58
  ]
32
59
  }
33
60
  ]